Advanced Strategic Command
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
NewGuiHost Class Reference

#include <guiiconhandler.h>

Inheritance diagram for NewGuiHost:
Inheritance graph
[legend]

Public Member Functions

 NewGuiHost (MainScreenWidget *parent, MapDisplayPG *mapDisplay, const PG_Rect &r)
 
void eval (const MapCoordinate &pos, ContainerBase *subject)
 
bool showSmallIcons (PG_Widget *parent, const SPoint &pos, bool cursorChanged)
 
bool clearSmallIcons ()
 
GuiButtongetButton (int i)
 
void disableButtons (int i)
 disables all button from i onward More...
 
bool ProcessEvent (const SDL_Event *event, bool bModal)
 
 ~NewGuiHost ()
 
- Public Member Functions inherited from DashboardPanel
void eval ()
 
void showUnitData (Vehicle *veh, Building *bld, MapField *fld, bool redraw=false)
 
- Public Member Functions inherited from LayoutablePanel
 LayoutablePanel (PG_Widget *parent, const PG_Rect &r, const ASCString &panelName_, bool loadTheme=true)
 
- Public Member Functions inherited from Panel
 Panel (PG_Widget *parent, const PG_Rect &r, const ASCString &panelName_, bool loadTheme=true)
 
- Public Member Functions inherited from ASCGUI_Window
void setLabelText (const ASCString &widgetName, const ASCString &text, PG_Widget *parent=NULL)
 
void setLabelText (const ASCString &widgetName, int i, PG_Widget *parent=NULL)
 
void setLabelColor (const ASCString &widgetName, PG_Color color, PG_Widget *parent=NULL)
 
void setImage (const ASCString &widgetName, Surface &image, PG_Widget *parent=NULL)
 
void setImage (const ASCString &widgetName, SDL_Surface *image=NULL, PG_Widget *parent=NULL)
 
void setImage (const ASCString &widgetName, const ASCString &filename, PG_Widget *parent=NULL)
 
void hide (const ASCString &widgetName, PG_Widget *parent=NULL)
 
void show (const ASCString &widgetName, PG_Widget *parent=NULL)
 
void setBargraphValue (const ASCString &widgetName, float fraction, PG_Widget *parent=NULL)
 
void setBarGraphColor (const ASCString &widgetName, PG_Color color, PG_Widget *parent=NULL)
 
void rename (const ASCString &widgetName, const ASCString &newname, PG_Widget *parent=NULL)
 
void setWidgetTransparency (const ASCString &widgetName, int transparency, PG_Widget *parent=NULL)
 
int RunModal ()
 

Static Public Member Functions

static void pushIconHandler (GuiIconHandler *iconHandler)
 
static GuiIconHandlergetIconHandler ()
 
static void popIconHandler ()
 

Static Public Attributes

static CommandpendingCommand = NULL
 

Protected Types

typedef vector< GuiButton * > Buttons
 
typedef vector< SmallGuiButton * > SmallButtons
 
- Protected Types inherited from ASCGUI_Window
typedef deallocating_map
< ASCString, TextPropertyGroup * > 
GuiCache
 

Protected Member Functions

bool mapIconProcessing (const MapCoordinate &pos, const SPoint &mousePos, bool cursorChanged, int button, int prio)
 
SmallGuiButtongetSmallButton (int i)
 
int gapSize (int num)
 
void reflowSmallIcons (const SPoint &pos, int count)
 
bool eventKeyDown (const SDL_KeyboardEvent *key)
 
bool eventKeyUp (const SDL_KeyboardEvent *key)
 
bool setNewButtonPressed (int i)
 when operated by keyboard, set a new button as the pressed one More...
 
void evalCursor ()
 
- Protected Member Functions inherited from DashboardPanel
 DashboardPanel (PG_Widget *parent, const PG_Rect &r, const ASCString &panelName_, bool loadTheme)
 
void painter (const PG_Rect &src, const ASCString &name, const PG_Rect &dst)
 
void registerSpecialDisplay (const ASCString &name)
 
void reset (GameMap &map)
 
bool containerRenamed (PG_LineEdit *lineEdit)
 
bool viewExperienceOverview ()
 
- Protected Member Functions inherited from LayoutablePanel
void eventMoveWidget (int x, int y)
 
void eventHide ()
 
void eventShow ()
 
- Protected Member Functions inherited from Panel
WidgetParameters getDefaultWidgetParams ()
 
- Protected Member Functions inherited from ASCGUI_Window
bool setup ()
 
virtual void userHandler (const ASCString &label, PropertyReadingContainer &pc, PG_Widget *parent, WidgetParameters widgetParams)
 
void parsePanelASCTXT (PropertyReadingContainer &pc, PG_Widget *parent, WidgetParameters widgetParams)
 
 ASCGUI_Window (PG_Widget *parent, const PG_Rect &r, const ASCString &panelName_, const ASCString &baseStyle="Panel", bool loadTheme=true)
 
 ~ASCGUI_Window ()
 

Protected Attributes

Buttons buttons
 
SmallButtons smallButtons
 
- Protected Attributes inherited from DashboardPanel
Vehicleveh
 
Buildingbld
 
- Protected Attributes inherited from ASCGUI_Window
TextPropertyGrouptextPropertyGroup
 

Static Protected Attributes

static SmallButtonHoldersmallButtonHolder = NULL
 
- Static Protected Attributes inherited from ASCGUI_Window
static GuiCache guiCache
 

Additional Inherited Members

- Static Protected Member Functions inherited from ASCGUI_Window
static PG_Rect parseRect (PropertyReadingContainer &pc, PG_Widget *parent)
 

Detailed Description

Definition at line 150 of file guiiconhandler.h.

Member Typedef Documentation

typedef vector<GuiButton*> NewGuiHost::Buttons
protected

Definition at line 169 of file guiiconhandler.h.

typedef vector<SmallGuiButton*> NewGuiHost::SmallButtons
protected

Definition at line 172 of file guiiconhandler.h.

Constructor & Destructor Documentation

NewGuiHost::NewGuiHost ( MainScreenWidget parent,
MapDisplayPG mapDisplay,
const PG_Rect &  r 
)
NewGuiHost::~NewGuiHost ( )

Definition at line 732 of file guiiconhandler.cpp.

Member Function Documentation

bool NewGuiHost::clearSmallIcons ( )
void NewGuiHost::disableButtons ( int  i)

disables all button from i onward

Definition at line 462 of file guiiconhandler.cpp.

References buttons, getButton(), and GuiButton::unregisterFunc().

Referenced by GuiFunctions::AttackGui::eval(), GuiIconHandler::eval(), and GuiFunctions::ObjectBuildingGui::eval().

void NewGuiHost::eval ( const MapCoordinate pos,
ContainerBase subject 
)

Definition at line 400 of file guiiconhandler.cpp.

References GuiIconHandler::eval().

void NewGuiHost::evalCursor ( )
protected
bool NewGuiHost::eventKeyDown ( const SDL_KeyboardEvent *  key)
protected
bool NewGuiHost::eventKeyUp ( const SDL_KeyboardEvent *  key)
protected
int NewGuiHost::gapSize ( int  num)
protected

Definition at line 342 of file guiiconhandler.cpp.

References smallGuiIconSpace.

Referenced by reflowSmallIcons().

GuiButton * NewGuiHost::getButton ( int  i)
GuiIconHandler * NewGuiHost::getIconHandler ( )
static
SmallGuiButton * NewGuiHost::getSmallButton ( int  i)
protected
bool NewGuiHost::mapIconProcessing ( const MapCoordinate pos,
const SPoint mousePos,
bool  cursorChanged,
int  button,
int  prio 
)
protected
void NewGuiHost::popIconHandler ( )
static
bool NewGuiHost::ProcessEvent ( const SDL_Event *  event,
bool  bModal 
)

Definition at line 524 of file guiiconhandler.cpp.

References SmallButtonHolder::ProcessEvent(), and smallButtonHolder.

Referenced by CargoDialog::ProcessEvent().

void NewGuiHost::pushIconHandler ( GuiIconHandler iconHandler)
static
void NewGuiHost::reflowSmallIcons ( const SPoint pos,
int  count 
)
protected
bool NewGuiHost::setNewButtonPressed ( int  i)
protected

when operated by keyboard, set a new button as the pressed one

Definition at line 588 of file guiiconhandler.cpp.

References buttons, getButton(), and GuiButton::showInfoText().

Referenced by eventKeyDown(), and eventKeyUp().

bool NewGuiHost::showSmallIcons ( PG_Widget *  parent,
const SPoint pos,
bool  cursorChanged 
)

Member Data Documentation

Buttons NewGuiHost::buttons
protected
Command * NewGuiHost::pendingCommand = NULL
static

Definition at line 211 of file guiiconhandler.h.

Referenced by GuiFunctions::MovementBase::available(), GuiFunctions::Movement::available(), CargoGuiFunctions::CancelMovement::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::RefuelUnitCommand::available(), GuiFunctions::RefuelUnitDialogCommand::available(), GuiFunctions::PutMineStage2::available(), GuiFunctions::RemoveMine::available(), GuiFunctions::BuildVehicleCommand::available(), GuiFunctions::ConstructBuilding::available(), commandPending(), GuiFunctions::ObjectBuildingGui::eval(), GuiFunctions::MovementBase::execute(), GuiFunctions::Cancel::execute(), GuiFunctions::AttackGui::execute(), CargoGuiFunctions::MovementDestination::execute(), CargoGuiFunctions::Movement::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::RefuelUnitDialogCommand::execute(), GuiFunctions::PutMine::execute(), GuiFunctions::PutMineStage2::execute(), GuiFunctions::RemoveMine::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::BuildVehicleCommand::execute(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::AttackGui::getName(), GuiFunctions::RepairUnit::getName(), GuiFunctions::ConstructBuilding::getName(), resetActions(), resetActiveGuiAction(), and GuiFunctions::AttackGui::setupWeapons().

SmallButtonHolder * NewGuiHost::smallButtonHolder = NULL
staticprotected
SmallButtons NewGuiHost::smallButtons
protected

Definition at line 173 of file guiiconhandler.h.

Referenced by getSmallButton().


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