ASCGUI_Window Class Reference

#include <windowing.h>

Inheritance diagram for ASCGUI_Window:

Inheritance graph
[legend]
List of all members.

Public Member Functions

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 ()

Protected Types

typedef deallocating_map<
ASCString, TextPropertyGroup * > 
GuiCache

Protected Member Functions

bool setup ()
virtual WidgetParameters getDefaultWidgetParams ()=0
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 ()

Static Protected Member Functions

static PG_Rect parseRect (PropertyReadingContainer &pc, PG_Widget *parent)

Protected Attributes

TextPropertyGrouptextPropertyGroup

Static Protected Attributes

static GuiCache guiCache

Classes

class  WidgetParameters

Detailed Description

Definition at line 34 of file windowing.h.


Member Typedef Documentation

typedef deallocating_map<ASCString, TextPropertyGroup*> ASCGUI_Window::GuiCache [protected]

Definition at line 80 of file windowing.h.


Constructor & Destructor Documentation

ASCGUI_Window::ASCGUI_Window ( PG_Widget *  parent,
const PG_Rect &  r,
const ASCString panelName_,
const ASCString baseStyle = "Panel",
bool  loadTheme = true 
) [protected]

Definition at line 312 of file windowing.cpp.

ASCGUI_Window::~ASCGUI_Window (  )  [protected]

Definition at line 942 of file windowing.cpp.


Member Function Documentation

bool ASCGUI_Window::setup (  )  [protected]

Definition at line 816 of file windowing.cpp.

References PropertyContainer::addInteger(), PropertyContainer::addString(), ASCGUI_Window::WidgetParameters::assign(), PropertyContainer::find(), getDefaultWidgetParams(), tfileerror::getFileName(), ASCmsgException::getMessage(), guiCache, CGameOptions::Instance(), max(), parsePanelASCTXT(), tnstream::reading, TextFormatParser::run(), ASCGUI_Window::WidgetParameters::runTextIO(), textPropertyGroup, ASCString::toLower(), and warningMessage().

Referenced by CargoDialog::CargoDialog(), ConfigurableWindow::ConfigurableWindow(), NextCampaignMap::NextCampaignMap(), Panel::Panel(), StartMultiplayerGame::StartMultiplayerGame(), and UnitInfoDialog::UnitInfoDialog().

virtual WidgetParameters ASCGUI_Window::getDefaultWidgetParams (  )  [protected, pure virtual]

Implemented in Panel, and ConfigurableWindow.

Referenced by setup().

void ASCGUI_Window::setLabelText ( const ASCString widgetName,
const ASCString text,
PG_Widget *  parent = NULL 
)

Definition at line 685 of file windowing.cpp.

Referenced by assignWeaponInfo(), CargoDialog::CargoDialog(), DashboardPanel::eval(), NextCampaignMap::NextCampaignMap(), NextCampaignMap::search(), setLabelText(), AttackPanel::setLabelText(), CargoDialog::setUnitInfoWidgets(), CargoDialog::showAmmo(), DashboardPanel::showUnitData(), UnitInfoDialog::UnitInfoDialog(), ResearchWindow::update(), ResourceInfoWindow::update(), CargoDialog::updateResourceDisplay(), CargoDialog::updateVariables(), and WeaponInfoPanel::WeaponInfoPanel().

void ASCGUI_Window::setLabelText ( const ASCString widgetName,
int  i,
PG_Widget *  parent = NULL 
)

Definition at line 726 of file windowing.cpp.

References setLabelText(), and ASCString::toString().

void ASCGUI_Window::setLabelColor ( const ASCString widgetName,
PG_Color  color,
PG_Widget *  parent = NULL 
)

Definition at line 710 of file windowing.cpp.

void ASCGUI_Window::setImage ( const ASCString widgetName,
Surface image,
PG_Widget *  parent = NULL 
)

Definition at line 739 of file windowing.cpp.

References Surface::getBaseSurface().

Referenced by assignWeaponInfo(), CargoDialog::CargoDialog(), setImage(), DashboardPanel::showUnitData(), and CargoDialog::updateVariables().

void ASCGUI_Window::setImage ( const ASCString widgetName,
SDL_Surface *  image = NULL,
PG_Widget *  parent = NULL 
)

Definition at line 744 of file windowing.cpp.

void ASCGUI_Window::setImage ( const ASCString widgetName,
const ASCString filename,
PG_Widget *  parent = NULL 
)

Definition at line 733 of file windowing.cpp.

References IconRepository::getIcon(), and setImage().

void ASCGUI_Window::hide ( const ASCString widgetName,
PG_Widget *  parent = NULL 
)

Definition at line 768 of file windowing.cpp.

Referenced by CargoDialog::CargoDialog(), DashboardPanel::showUnitData(), and CargoDialog::updateVariables().

void ASCGUI_Window::show ( const ASCString widgetName,
PG_Widget *  parent = NULL 
)

Definition at line 778 of file windowing.cpp.

Referenced by DashboardPanel::showUnitData(), and CargoDialog::updateVariables().

void ASCGUI_Window::setBargraphValue ( const ASCString widgetName,
float  fraction,
PG_Widget *  parent = NULL 
)

Definition at line 790 of file windowing.cpp.

Referenced by DashboardPanel::eval(), AttackPanel::setBarGraphValue(), CargoDialog::setUnitInfoWidgets(), DashboardPanel::showUnitData(), and CargoDialog::updateVariables().

void ASCGUI_Window::setBarGraphColor ( const ASCString widgetName,
PG_Color  color,
PG_Widget *  parent = NULL 
)

Definition at line 801 of file windowing.cpp.

Referenced by DashboardPanel::eval(), and AttackPanel::setBarGraphColor().

void ASCGUI_Window::rename ( const ASCString widgetName,
const ASCString newname,
PG_Widget *  parent = NULL 
)

Definition at line 675 of file windowing.cpp.

void ASCGUI_Window::setWidgetTransparency ( const ASCString widgetName,
int  transparency,
PG_Widget *  parent = NULL 
)

Definition at line 757 of file windowing.cpp.

Referenced by assignWeaponInfo().

int ASCGUI_Window::RunModal (  ) 

Reimplemented in CargoDialog.

Definition at line 159 of file windowing.cpp.

Referenced by nextCampaignMap(), UnitInfoPanel::onClick(), CargoDialog::RunModal(), startMultiplayerGame(), and unitInfoDialog().

virtual void ASCGUI_Window::userHandler ( const ASCString label,
PropertyReadingContainer pc,
PG_Widget *  parent,
WidgetParameters  widgetParams 
) [inline, protected, virtual]

Definition at line 101 of file windowing.h.

Referenced by parsePanelASCTXT().

PG_Rect ASCGUI_Window::parseRect ( PropertyReadingContainer pc,
PG_Widget *  parent 
) [static, protected]

Definition at line 319 of file windowing.cpp.

References PropertyContainer::addInteger().

Referenced by parsePanelASCTXT().

void ASCGUI_Window::parsePanelASCTXT ( PropertyReadingContainer pc,
PG_Widget *  parent,
WidgetParameters  widgetParams 
) [protected]

Definition at line 370 of file windowing.cpp.

References PropertyContainer::addBool(), PropertyContainer::addDFloat(), PropertyContainer::addInteger(), PropertyContainer::addNamedInteger(), PropertyContainer::addString(), PropertyContainer::addStringArray(), Area, ASCGUI_Window::WidgetParameters::assign(), barDirectionNum, barDirections, BarGraph, Button, CheckBox, PropertyContainer::closeBracket(), ASCString::compare_ci(), Dummy, PropertyContainer::find(), IconRepository::getIcon(), PropertyContainer::getNameStack(), hasTransparency(), Image, imageModeNum, imageModes, LineEdit, ListBox, MultiLineText, PropertyContainer::openBracket(), parseRect(), Plain, RadioButton, ASCGUI_Window::WidgetParameters::runTextIO(), ScrollArea, BarGraphWidget::setColor(), Slider, sliderDirectionNum, sliderDirections, SpecialDisplay, SpecialInput, StaticLabel, TextOutput, ASCString::toString(), PolygonTriangulationLibrary::tr, userHandler(), warningMessage(), widgetTypeNum, and widgetTypes.

Referenced by setup(), CargoDialog::userHandler(), and WeaponInfoPanel::WeaponInfoPanel().


Member Data Documentation

ASCGUI_Window::GuiCache ASCGUI_Window::guiCache [static, protected]

Definition at line 81 of file windowing.h.

Referenced by setup().

TextPropertyGroup* ASCGUI_Window::textPropertyGroup [protected]

Definition at line 83 of file windowing.h.

Referenced by setup(), and WeaponInfoPanel::WeaponInfoPanel().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:46:19 2012 for Advanced Strategic Command by  doxygen 1.5.1