This file is indexed.

/usr/include/crystalspace-2.0/ivaria/hudmanager.h is in libcrystalspace-dev 2.0+dfsg-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
/*
  Copyright (C) 2010-11 Christian Van Brussel, Institute of Information
      and Communication Technologies, Electronics and Applied Mathematics
      at Universite catholique de Louvain, Belgium
      http://www.uclouvain.be/en-icteam.html

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public
  License along with this library; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CS_IVARIA_HUDMANAGER_H__
#define __CS_IVARIA_HUDMANAGER_H__

/**\file 
 * Head-Up Display tool for the display of information for the user
 */

/**
 * \addtogroup appframe
 * @{ */

#include "cssysdef.h"
#include "csutil/scf.h"

struct iStringArray;

namespace CS {
namespace Utility {

/**
 * A generic tool managing the display of a minimal text-based HUD, eg for applications
 * implementing CS::Utility::DemoApplication or providing a user interface through the keyboard.
 *
 * The HUD consists of the Crystal Space logo, the list of available keyboard and mouse actions
 * that can be used to interact with the demo, and a list of strings
 * describing the current state of the application.
 *
 * You need to setup or update the list of keys and current states (keyDescriptions and
 * stateDescriptions) whenever they change. The description of the state is augmented with
 * informations such as the current Frames Per Second.
 */
struct iHUDManager : public virtual iBase
{
  SCF_INTERFACE (CS::Utility::iHUDManager, 1, 0, 0);

  /**
   * Switch to the next page describing the list of available keyboard keys. This is useful
   * when the list of available keyboard keys is too big and needs to be split in several
   * different pages.
   */
  virtual void SwitchKeysPage () = 0;

  /**
   * Display a 2D text with a shadow. Additional parameters can be defined,
   * they will be formated into the text string by using the cs_snprintf()-style
   * formatting directives.
   */
  virtual void WriteShadow (int x, int y, int color, const char *str,...) const = 0;
  /**
   * Display a 2D text. Additional parameters can be defined,
   * they will be formated into the text string by using the cs_snprintf()-style
   * formatting directives.
   */
  virtual void Write (int x, int y, int fg, int color, const char *str,...) const = 0;

  /**
   * Set whether or not the HUD will be displayed. If not enabled, then this manager
   * will not be displayed nor active at all.
   */
  virtual void SetEnabled (bool enabled) = 0;

  /**
   * Get whether or not the HUD is displayed. If not enabled, then this manager
   * will not be displayed nor active at all.
   */
  virtual bool GetEnabled () const = 0;

  /**
   * Return the array of string describing the available user keys (eg <tt>'d: toggle debug mode'</tt>).
   * You can manipulate this array in order to define the list of keys to be displayed.
   * By default the array is filled with the keys available to move the camera. You
   * can call iStringArray::Empty() if you don't want these keys to be displayed.
   */
  virtual iStringArray* GetKeyDescriptions () = 0;

  /**
   * Return the array of string describing the state of the application (eg <tt>'Debug mode enabled'</tt>).
   * You can manipulate this array in order to define the list of state descriptions to be displayed.
   */
  virtual iStringArray* GetStateDescriptions () = 0;
};

} //namespace Utility
} //namespace CS

/** @} */

#endif // __CS_IVARIA_HUDMANAGER_H__