Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 ()
 Enter modal mode.

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

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 922 of file windowing.cpp.


Member Function Documentation

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

Implemented in Panel, and ConfigurableWindow.

Referenced by setup().

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

Definition at line 780 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by CargoDialog::CargoDialog(), WeaponInfoPanel::showWeapon(), and CargoInfoWindow::update().

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(), PG_RadioButton::AddToGroup(), Area, ASCGUI_Window::WidgetParameters::assign(), barDirectionNum, barDirections, BarGraph, Button, CheckBox, PropertyContainer::closeBracket(), ASCString::compare_ci(), Dummy, PG_ScrollWidget::EnableScrollBar(), PropertyContainer::find(), Surface::getBaseSurface(), IconRepository::getIcon(), PG_Widget::GetName(), PropertyContainer::getNameStack(), hasTransparency(), PG_ScrollBar::HORIZONTAL, Image, imageModeNum, imageModes, LineEdit, ListBox, MultiLineText, PropertyContainer::openBracket(), parseRect(), PG_NULLSTR, PG_ThemeWidget::PG_ThemeWidget(), Plain, RadioButton, ASCGUI_Window::WidgetParameters::runTextIO(), ScrollArea, BarGraphWidget::setColor(), PG_Widget::SetDirtyUpdate(), PG_Widget::SetName(), PG_LineEdit::SetText(), PG_RadioButton::SetText(), PG_Button::SetText(), PG_Widget::SetTransparency(), Slider, sliderDirectionNum, sliderDirections, SpecialDisplay, SpecialInput, StaticLabel, TextOutput, ASCString::toString(), PolygonTriangulationLibrary::tr, userHandler(), PG_ScrollBar::VERTICAL, warning(), widgetTypeNum, and widgetTypes.

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

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

Definition at line 319 of file windowing.cpp.

References PropertyContainer::addInteger(), PG_Rect::Height(), and PG_Rect::Width().

Referenced by parsePanelASCTXT(), and UnitInfoDialog::userHandler().

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

Definition at line 687 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by UnitInfoDialog::userHandler().

int ASCGUI_Window::RunModal  )  [virtual]
 

Enter modal mode.

Reimplemented from PG_Widget.

Reimplemented in CargoDialog.

Definition at line 159 of file windowing.cpp.

References PG_Widget::RunModal().

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

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

Definition at line 813 of file windowing.cpp.

References PG_Widget::FindChild().

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

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

Definition at line 802 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by DashboardPanel::eval(), AttackPanel::setBarGraphValue(), DashboardPanel::showUnitData(), and CargoInfoWindow::update().

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

Definition at line 745 of file windowing.cpp.

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

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

Definition at line 756 of file windowing.cpp.

References PG_Widget::FindChild().

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

Definition at line 751 of file windowing.cpp.

References Surface::getBaseSurface().

Referenced by assignWeaponInfo(), setImage(), WeaponInfoPanel::showWeapon(), CargoInfoWindow::update(), and SolarPowerWindow::update().

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

Definition at line 722 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by WeaponInfoPanel::showWeapon().

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

Definition at line 738 of file windowing.cpp.

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

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

Definition at line 697 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by assignWeaponInfo(), CargoDialog::CargoDialog(), DashboardPanel::eval(), NextCampaignMap::NextCampaignMap(), NextCampaignMap::search(), setLabelText(), AttackPanel::setLabelText(), CargoDialog::showAmmo(), DashboardPanel::showUnitData(), WeaponInfoPanel::showWeapon(), UnitInfoDialog::UnitInfoDialog(), MatterAndMiningBaseWindow::update(), ResearchWindow::update(), ResourceInfoWindow::update(), BuildingControlWindow::update(), CargoInfoWindow::update(), WindPowerWindow::update(), SolarPowerWindow::update(), CargoDialog::updateResourceDisplay(), UnitInfoDialog::userHandler(), and WeaponInfoPanel::WeaponInfoPanel().

bool ASCGUI_Window::setup  )  [protected]
 

Definition at line 828 of file windowing.cpp.

References PropertyContainer::addInteger(), PropertyContainer::addString(), ASCGUI_Window::WidgetParameters::assign(), PropertyContainer::find(), getDefaultWidgetParams(), tfileerror::getFileName(), ASCmsgException::getMessage(), PG_Widget::GetParent(), PG_Application::GetScreenHeight(), PG_Application::GetScreenWidth(), guiCache, PG_Rect::Height(), CGameOptions::Instance(), max(), PG_Widget::MoveWidget(), parsePanelASCTXT(), tnstream::reading, TextFormatParser::run(), ASCGUI_Window::WidgetParameters::runTextIO(), PG_Window::SetTitle(), PG_Window::SetTitlebarHeight(), PG_Widget::SizeWidget(), textPropertyGroup, ASCString::toLower(), warning(), and PG_Rect::Width().

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

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

Definition at line 769 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by assignWeaponInfo().

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

Definition at line 790 of file windowing.cpp.

References PG_Widget::FindChild().

Referenced by WeaponInfoPanel::showWeapon(), and CargoInfoWindow::update().

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

Reimplemented in CargoDialog, StartMultiplayerGame, and UnitInfoDialog.

Definition at line 101 of file windowing.h.

Referenced by parsePanelASCTXT().


Member Data Documentation

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

Definition at line 825 of file windowing.cpp.

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 Tue Jun 24 02:16:11 2008 for Advanced Strategic Command by  doxygen 1.4.2