Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2588 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui.h


Ignore:
Timestamp:
Oct 17, 2004, 5:18:58 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: doxygen orxodox created for all h-files, classes and functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/gui/orxonox_gui.h

    r2587 r2588  
     1/*!
     2 \file orxonox_gui.h
     3 \brief Contains all Widgets and the Creation of the Gui
     4*/
     5
    16#ifndef _ORXONOX_GUI_H
    27#define _ORXONOX_GUI_H
     
    1924#include <gtk/gtkeventbox.h>
    2025
     26//! Class that creates the OrxonoxGui
    2127class OrxonoxGui
    2228{
     
    2733};
    2834
     35//! This is the topmost object that can be displayed all others are derived from it.
     36
    2937class Widget
    3038{
    3139 private:
    3240 public:
    33   Widget* next;
    34   GtkWidget* widget;
     41  Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next
     42  GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains.
    3543  virtual void init(void);
    36   int is_option;
     44  int is_option; //!< with this Paramenter one can set the IsOption type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option
    3745
    3846  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
     
    4856
    4957
    50 
     58//! This is a Container Class, it can contain one sub-Widget: down.
     59/**
     60 * A Container is a Widget that can hold a subWidget in addition to a next-Widget.
     61 * The Container can by itself not be displayed created or used.
     62 * The derived classes of Container can be displayed
     63*/
    5164class Container : public Widget
    5265{
     
    5871 public:
    5972  void init(void);
    60   Widget* down;
    61   void setBorderWidth (int borderwidth);
    62   virtual void setTitle (char* title) = 0;
     73  Widget* down; //!< this points to the Widget below this.
     74  //  void setBorderWidth (int borderwidth);
     75  //  virtual void setTitle (char* title) = 0;
    6376  void fill (Widget *lowerWidget);
    6477};
    6578
     79//! Window is the class that creates new Windows, and handels them
     80/**
     81 * A Window is a class derived from Container that contains a window-widget.
     82 * It has the ability to hold one sub-object
     83 */
    6684class Window : public Container
    6785{
     
    7391 
    7492  void setTitle (char* title);
    75   void showall ();
     93  void showall (); 
    7694  static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
    7795};
    7896
     97//! Frame is the class that handles frames
     98/**
     99 * A Frame is an object, that has a border and if you like a name on it.
     100 * It can contain a Widget, which means that you can insert anything you like inside of a frame
     101 */
    79102class Frame :public Container
    80103{
     
    88111};
    89112
     113//! EventBox is a Container that can Handle all Events happening inside of it.
     114/**
     115 * Example: if you have a picture, and you want it to catch mouse-clicks, you have to pack it inside a EventBox
     116 */
    90117class EventBox : public Container
    91118{
     
    99126};
    100127
     128//! A Box can contain multiple Widgets
     129/**
     130 * A Box can Contain multiple Widgets, that are ordered either horizontally or vertically
     131 * I defined the standartbox to be horizontally.
     132 * A Box is always filled left->right (horizontally) or up->down (vertically)
     133 */
    101134class Box : public Widget
    102135{
     
    107140  void init(char boxtype);
    108141
    109   Widget* down;
     142  Widget* down; //!< the Lower Widget of a Box.
    110143  void fill (Widget* lowerWidget);
    111144
    112145};
    113146
     147//! Image is the keeper of one Image
     148/**
     149 * Images are mighty cool.
     150 * Images can help you lighten up the Programming process, and will give everyone a better impression of the Software.
     151 */
    114152class Image : public Widget
    115153{
     
    120158};
    121159
     160//! An Option is a Widget that contains something that may change its state.
     161/**
     162 * Options are the essence of a GUI, they: Configure, Start, Quit, Execute, and make it worth something
     163 */
    122164class Option : public Widget
    123165{
     
    126168  void init(void);
    127169
    128   int value;
    129   char* option_name;
    130   char* flag_name;
    131   char* flag_name_short;
    132   int default_value;
     170  int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume
     171  char* option_name; //!< options have a name, that can be displayed around them
     172  char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI.
     173  char* flag_name_short; //!< like flag_name but shorter
     174  int default_value; //!< A default value is good, for hiding a option if it is not needed. (hidden if value == default_value)
    133175
    134176  void setFlagName (char* flagname, int defaultvalue);
    135177  void setFlagName (char* flagname, char* flagnameshort, int defaultvalue);
    136   virtual void redraw () = 0;
    137 };
    138 
     178  virtual void redraw () = 0; //!< A Option must be able to redraw itself.
     179};
     180
     181//! Buttons can be pressed, and released.
     182/**
     183 * Buttons are mainly there for executing some action like Starting the Programm, or Quiting it.
     184 */
    139185class Button : public Option
    140186{
     
    149195};
    150196
     197//! CheckButtons are a key in configuring bool Variables
     198/** CheckButtons can configure bool Variables like wireframe on/off, enable_sound etc.
     199 */
    151200class CheckButton : public Option
    152201{
     
    162211};
    163212
     213//! Sliders are Options that can be modified in their value
     214/**
     215 * good for volume, brightness, etc.
     216 */
    164217class Slider : public Option
    165218{
     
    176229};
    177230
     231//! A Menu is an Option that has a dropdown menu, where you can chose between different Items
    178232class Menu : public Option
    179233{
     
    195249};
    196250
     251//! A label is a Widget, that displays a text
    197252class Label : public Widget
    198253{
Note: See TracChangeset for help on using the changeset viewer.