____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

gcn::Gui Class Reference

#include <gui.h>

List of all members.

Public Member Functions

 Gui ()
virtual ~Gui ()
virtual void setTop (Widget *top)
virtual WidgetgetTop () const
virtual void setGraphics (Graphics *graphics)
virtual GraphicsgetGraphics () const
virtual void setInput (Input *input)
virtual InputgetInput () const
virtual void logic ()
virtual void draw ()
virtual void focusNone ()
virtual void setTabbingEnabled (bool tabbing)
virtual bool isTabbingEnabled ()
virtual void setUseDirtyDrawing (bool useDirtyDrawing)

Protected Attributes

bool mTopHasMouse
bool mTabbing
WidgetmTop
GraphicsmGraphics
InputmInput
FocusHandlermFocusHandler
bool mUseDirtyDrawing


Detailed Description

Introduction

This documentation is mostly intended as a reference to the API. If you want to get started with Guichan, we suggest you check out the programs in the examples directory of the Guichan release.

This documentation is, and will always be, work in progress. If you find any errors, typos or inconsistencies, or if you feel something needs to be explained in more detail - don't hesitate to tell us.

Gui core class. Contains a special widget called the top widget. If you want to be able to have more then one Widget in your Gui, the top widget should be a Container.

NOTE: For the Gui to function properly you need to set a Graphics object to use and an Input object to use.

Definition at line 83 of file gui.h.


Constructor & Destructor Documentation

gcn::Gui::Gui (  ) 

Constructor.

Definition at line 66 of file gui.cpp.

References mFocusHandler, mGraphics, mInput, mTabbing, mTop, mTopHasMouse, and mUseDirtyDrawing.

gcn::Gui::~Gui (  )  [virtual]

Destructor.

Definition at line 77 of file gui.cpp.

References mFocusHandler, mTop, setTop(), and gcn::Widget::widgetExists().


Member Function Documentation

void gcn::Gui::setTop ( Widget top  )  [virtual]

Widget * gcn::Gui::getTop (  )  const [virtual]

Gets the top Widget.

Returns:
the top widget. NULL if no top widget has been set.

Definition at line 102 of file gui.cpp.

References mTop.

Referenced by MenuScreen::draw(), EditorMainLoop(), EditorUpdateDisplay(), MenuScreen::MenuScreen(), PatchEditorMainLoop(), and StartMap().

void gcn::Gui::setGraphics ( Graphics graphics  )  [virtual]

Sets the Graphics object to use for drawing.

Parameters:
graphics the Graphics object to use for drawing.
See also:
SDLGraphics, OpenGLGraphics, AllegroGraphics

Definition at line 107 of file gui.cpp.

References mGraphics.

Referenced by initGuichan().

Graphics * gcn::Gui::getGraphics (  )  const [virtual]

Gets the Graphics object used for drawing.

Returns:
the Graphics object used for drawing. NULL if no Graphics object has been set.

Definition at line 112 of file gui.cpp.

References mGraphics.

Referenced by MenuScreen::draw(), and freeGuichan().

void gcn::Gui::setInput ( Input input  )  [virtual]

Sets the Input object to use for input handling.

Parameters:
input the Input object to use for input handling.
See also:
SDLInput, AllegroInput

Definition at line 117 of file gui.cpp.

References mInput.

Referenced by initGuichan().

Input * gcn::Gui::getInput (  )  const [virtual]

Gets the Input object being used for input handling.

Returns:
the Input object used for handling input. NULL if no Input object has been set.

Definition at line 122 of file gui.cpp.

References mInput.

void gcn::Gui::logic (  )  [virtual]

void gcn::Gui::draw (  )  [virtual]

void gcn::Gui::focusNone (  )  [virtual]

Focus none of the Widgets in the Gui.

Definition at line 283 of file gui.cpp.

References gcn::FocusHandler::focusNone(), and mFocusHandler.

void gcn::Gui::setTabbingEnabled ( bool  tabbing  )  [virtual]

Toggles the use of the tab key to focus Widgets. By default, tabbing is enabled.

Parameters:
tabbing set to false if you want to disable tabbing.

Definition at line 288 of file gui.cpp.

References mTabbing.

bool gcn::Gui::isTabbingEnabled (  )  [virtual]

Checks if tabbing is enabled.

Returns:
true if tabbing is enabled.

Definition at line 293 of file gui.cpp.

References mTabbing.

void gcn::Gui::setUseDirtyDrawing ( bool  useDirtyDrawing  )  [virtual]

Definition at line 298 of file gui.cpp.

References mUseDirtyDrawing.

Referenced by DrawGuichanWidgets(), and initGuichan().


Member Data Documentation

bool gcn::Gui::mTopHasMouse [protected]

Definition at line 183 of file gui.h.

Referenced by Gui().

bool gcn::Gui::mTabbing [protected]

Definition at line 184 of file gui.h.

Referenced by Gui(), isTabbingEnabled(), logic(), and setTabbingEnabled().

Widget* gcn::Gui::mTop [protected]

Definition at line 186 of file gui.h.

Referenced by draw(), getTop(), Gui(), logic(), setTop(), and ~Gui().

Definition at line 187 of file gui.h.

Referenced by draw(), getGraphics(), Gui(), and setGraphics().

Input* gcn::Gui::mInput [protected]

Definition at line 188 of file gui.h.

Referenced by getInput(), Gui(), logic(), and setInput().

Definition at line 189 of file gui.h.

Referenced by focusNone(), Gui(), logic(), setTop(), and ~Gui().

bool gcn::Gui::mUseDirtyDrawing [protected]

Definition at line 190 of file gui.h.

Referenced by draw(), Gui(), and setUseDirtyDrawing().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:26 2009 for Bos Wars by  doxygen 1.5.6