$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

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 draw (Widget *top)
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.


Constructor & Destructor Documentation

gcn::Gui::Gui (  ) 

Constructor.

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

Destructor.


Member Function Documentation

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

Sets the top Widget.

Parameters:
top the top Widget.

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

Gets the top Widget.

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

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

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.

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

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.

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

Performs the Gui logic. By calling this function all logic functions down in the Gui heirarchy will be called. What performs in Logic can be just about anything like adjusting a Widgets size or doing some calculations.

NOTE: Logic also deals with user input (Mouse and Keyboard) for Widgets.

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

Draws the Gui. By calling this funcion all draw functions down in the Gui hierarchy will be called.

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

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

Focus none of the Widgets in the Gui.

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.

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

Checks if tabbing is enabled.

Returns:
true if tabbing is enabled.

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


Member Data Documentation

bool gcn::Gui::mTopHasMouse [protected]

bool gcn::Gui::mTabbing [protected]

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

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

bool gcn::Gui::mUseDirtyDrawing [protected]


The documentation for this class was generated from the following files:
(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.