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

CFuiComponent Class Reference

#include <Fui.h>

Inheritance diagram for CFuiComponent:

CStreamObject CObject CFuiBox CFuiButton CFuiCheckbox CFuiCloseButton CFuiGauge CFuiGraph CFuiGroupBox CFuiHorizontalMarquee CFuiLabel CFuiLine CFuiList CFuiMap CFuiMarquee CFuiMenuBar CFuiMinimizeButton CFuiPicture CFuiProgress CFuiRadioButton CFuiScrollArea CFuiScrollBar CFuiSlider CFuiTabButton CFuiTabControl CFuiTabPage CFuiTextArea CFuiTextField CFuiTextPopup CFuiWindow CFuiWindowTitle CFuiZoomButton List of all members.

Public Member Functions

 CFuiComponent (int x=0, int y=0, int w=0, int h=0, Tag window=0)
virtual ~CFuiComponent (void)
virtual int Read (SStream *stream, Tag tag)
virtual void ReadFinished (void)
bool IsType (EFuiComponentTypes type)
virtual void SetParentWindowId (Tag parentWindowId)
Tag GetId (void)
void Show (void)
void Hide (void)
void Enable (void)
void Disable (void)
char * GetText (void)
virtual void SetText (const char *text)
virtual void SetPosition (int x, int y)
virtual void SetParentPosition (int xParent, int yParent)
virtual void SetSize (int w, int h)
virtual void SetPositionSize (int x, int y, int w, int h)
virtual bool MouseHit (int x, int y)
virtual bool MouseMove (int x, int y)
virtual bool MouseClick (int x, int y, EMouseButton button)
virtual bool MouseStopClick (int x, int y, EMouseButton button)
virtual void Draw (void)

Protected Member Functions

void MakeSurface (void)

Protected Attributes

Tag parentWindowId
 Parent window of this component.
EFuiComponentTypes type
Tag id
int bind
char widgetName [64]
Tag widgetTag
char text [256]
int xParent
int yParent
int x
int y
int w
int h
int enable
int show
Tag fontTag
SFontfont
SSurfacesurface

Detailed Description

Definition at line 222 of file Fui.h.


Constructor & Destructor Documentation

CFuiComponent::CFuiComponent int  x = 0,
int  y = 0,
int  w = 0,
int  h = 0,
Tag  window = 0
 

Definition at line 79 of file Fui.cpp.

References bind, enable, font, fontTag, parentWindowId, show, surface, text, type, widgetName, widgetTag, xParent, and yParent.

CFuiComponent::~CFuiComponent void   )  [virtual]
 

Todo:
Fix crash when window is closed through close button or Cancel

Definition at line 106 of file Fui.cpp.


Member Function Documentation

void CFuiComponent::Disable void   )  [inline]
 

Definition at line 240 of file Fui.h.

References enable.

void CFuiComponent::Draw void   )  [virtual]
 

Reimplemented in CFuiPicture, CFuiButton, CFuiWindowTitle, CFuiCloseButton, CFuiMinimizeButton, CFuiZoomButton, CFuiWindow, CFuiPopupMenu, CFuiCheckbox, CFuiRadioButton, CFuiLabel, CFuiLine, CFuiBox, CFuiSlider, CFuiGroupBox, CFuiList, CFuiTextField, and CFuiGraph.

Definition at line 261 of file Fui.cpp.

References SSurface::drawBuffer, show, surface, SSurface::xScreen, SSurface::xSize, SSurface::yScreen, and SSurface::ySize.

Referenced by CFuiManager::Draw(), CFuiLabel::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CFuiPopupMenu::Draw(), CFuiButton::Draw(), and CFuiWindowTitle::Draw().

void CFuiComponent::Enable void   )  [inline]
 

Definition at line 239 of file Fui.h.

References enable.

Tag CFuiComponent::GetId void   )  [inline]
 

Definition at line 236 of file Fui.h.

References id.

char* CFuiComponent::GetText void   )  [inline]
 

Reimplemented in CFuiTextField.

Definition at line 241 of file Fui.h.

References text.

void CFuiComponent::Hide void   )  [inline]
 

Definition at line 238 of file Fui.h.

References show.

bool CFuiComponent::IsType EFuiComponentTypes  type  )  [inline]
 

Definition at line 234 of file Fui.h.

Referenced by CFuiManager::AddPopupItem(), CFuiManager::AddPopupSeperator(), CFuiManager::ClearPopupItems(), CFuiPopupMenu::Draw(), CFuiManager::FindCheckbox(), CFuiManager::FindGraph(), CFuiManager::FindLabel(), CFuiManager::FindList(), CFuiManager::FindSlider(), CFuiManager::GetCheckboxState(), CFuiManager::GetPopupItemSelection(), CFuiManager::GetRadioState(), CFuiManager::GetTextLength(), CFuiManager::GetTextMaxChars(), CFuiManager::GetTextSelection(), CFuiManager::GetTextText(), CFuiManager::IsTextPassword(), CFuiManager::RemovePopupItem(), CFuiManager::SelectPopupItem(), CFuiManager::SetCheckboxState(), CFuiManager::SetGroupBoxLabel(), CFuiManager::SetRadioState(), CFuiManager::SetTextMaxChars(), CFuiManager::SetTextSelection(), CFuiManager::SetTextText(), and CFuiManager::UseTextPassword().

void CFuiComponent::MakeSurface void   )  [protected]
 

Definition at line 196 of file Fui.cpp.

References CreateSurface(), EraseSurface(), h, surface, w, x, xParent, SSurface::xScreen, y, yParent, and SSurface::yScreen.

Referenced by ReadFinished(), and CFuiPicture::SetBitmap().

bool CFuiComponent::MouseClick int  x,
int  y,
EMouseButton  button
[virtual]
 

Reimplemented in CFuiButton, CFuiCloseButton, CFuiMinimizeButton, CFuiZoomButton, CFuiWindow, CFuiCheckbox, CFuiRadioButton, and CFuiGroupBox.

Definition at line 290 of file Fui.cpp.

Referenced by CFuiWindow::MouseClick().

bool CFuiComponent::MouseHit int  x,
int  y
[virtual]
 

Definition at line 276 of file Fui.cpp.

References h, x, xParent, y, and yParent.

Referenced by CFuiRadioButton::MouseClick(), CFuiCheckbox::MouseClick(), CFuiButton::MouseClick(), CFuiWindow::MouseClick(), CFuiZoomButton::MouseClick(), CFuiMinimizeButton::MouseClick(), CFuiCloseButton::MouseClick(), CFuiButton::MouseMove(), CFuiZoomButton::MouseMove(), CFuiMinimizeButton::MouseMove(), CFuiCloseButton::MouseMove(), CFuiRadioButton::MouseStopClick(), and CFuiCheckbox::MouseStopClick().

bool CFuiComponent::MouseMove int  x,
int  y
[virtual]
 

Reimplemented in CFuiButton, CFuiCloseButton, CFuiMinimizeButton, CFuiZoomButton, CFuiWindow, and CFuiGroupBox.

Definition at line 284 of file Fui.cpp.

bool CFuiComponent::MouseStopClick int  x,
int  y,
EMouseButton  button
[virtual]
 

Reimplemented in CFuiButton, CFuiCloseButton, CFuiMinimizeButton, CFuiZoomButton, CFuiWindow, CFuiCheckbox, CFuiRadioButton, and CFuiGroupBox.

Definition at line 296 of file Fui.cpp.

Referenced by CFuiWindow::MouseStopClick().

int CFuiComponent::Read SStream stream,
Tag  tag
[virtual]
 

Reimplemented from CStreamObject.

Reimplemented in CFuiPicture, CFuiButton, CFuiWindow, CFuiPopupMenu, CFuiCheckbox, CFuiRadioButton, CFuiLabel, CFuiLine, CFuiBox, CFuiSlider, CFuiGroupBox, CFuiList, CFuiTextField, and CFuiGraph.

Definition at line 120 of file Fui.cpp.

References bind, enable, font, fontTag, globals, h, SGlobals::logWarning, ReadInt(), ReadString(), ReadTag(), show, TAG_IGNORED, TAG_READ, TagString(), text, w, widgetName, widgetTag, CLogFile::Write(), x, and y.

Referenced by CFuiTextField::Read(), CFuiLabel::Read(), CFuiRadioButton::Read(), CFuiCheckbox::Read(), CFuiButton::Read(), and CFuiWindow::Read().

void CFuiComponent::ReadFinished void   )  [virtual]
 

Reimplemented from CStreamObject.

Reimplemented in CFuiPicture, CFuiButton, CFuiWindow, CFuiPopupMenu, CFuiCheckbox, CFuiRadioButton, CFuiLabel, CFuiLine, CFuiBox, CFuiSlider, CFuiGroupBox, CFuiList, and CFuiTextField.

Definition at line 179 of file Fui.cpp.

References font, fontTag, FuiFont(), and MakeSurface().

Referenced by CFuiTextField::ReadFinished(), CFuiLabel::ReadFinished(), CFuiRadioButton::ReadFinished(), CFuiCheckbox::ReadFinished(), CFuiPopupMenu::ReadFinished(), and CFuiButton::ReadFinished().

void CFuiComponent::SetParentPosition int  xParent,
int  yParent
[virtual]
 

Reimplemented in CFuiButton, CFuiWindowTitle, CFuiCloseButton, CFuiMinimizeButton, CFuiZoomButton, CFuiPopupMenu, CFuiSlider, CFuiGroupBox, CFuiList, and CFuiTextField.

Definition at line 228 of file Fui.cpp.

References surface, x, SSurface::xScreen, y, and SSurface::yScreen.

Referenced by CFuiTextField::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiWindow::ReadFinished(), CFuiPopupMenu::SetParentPosition(), CFuiButton::SetParentPosition(), CFuiZoomButton::SetParentPosition(), CFuiMinimizeButton::SetParentPosition(), CFuiCloseButton::SetParentPosition(), and CFuiWindowTitle::SetParentPosition().

void CFuiComponent::SetParentWindowId Tag  parentWindowId  )  [virtual]
 

Definition at line 185 of file Fui.cpp.

void CFuiComponent::SetPosition int  x,
int  y
[virtual]
 

Reimplemented in CFuiWindow.

Definition at line 212 of file Fui.cpp.

References globals, SGlobals::screenHeight, SGlobals::screenWidth, surface, xParent, SSurface::xScreen, yParent, and SSurface::yScreen.

Referenced by CFuiManager::CFuiManager(), CFuiWindow::SetPosition(), and SetPositionSize().

void CFuiComponent::SetPositionSize int  x,
int  y,
int  w,
int  h
[virtual]
 

Definition at line 255 of file Fui.cpp.

References SetPosition(), and SetSize().

Referenced by CFuiWindowTitle::Fill().

void CFuiComponent::SetSize int  w,
int  h
[virtual]
 

Definition at line 239 of file Fui.cpp.

References CreateSurface(), FreeSurface(), surface, x, xParent, y, and yParent.

Referenced by SetPositionSize().

void CFuiComponent::SetText const char *  text  )  [virtual]
 

Reimplemented in CFuiTextPopup.

Definition at line 204 of file Fui.cpp.

Referenced by CFuiWindow::ReadFinished(), CFuiManager::SetComponentText(), CFuiManager::SetGroupBoxLabel(), CFuiManager::SetSliderLabel(), and CFuiWindow::SetTitle().

void CFuiComponent::Show void   )  [inline]
 

Definition at line 237 of file Fui.h.

References show.


Member Data Documentation

int CFuiComponent::bind [protected]
 

Definition at line 263 of file Fui.h.

Referenced by CFuiComponent(), and Read().

int CFuiComponent::enable [protected]
 

Definition at line 270 of file Fui.h.

Referenced by CFuiComponent(), Disable(), Enable(), and Read().

SFont* CFuiComponent::font [protected]
 

Definition at line 273 of file Fui.h.

Referenced by CFuiComponent(), CFuiWindowTitle::CFuiWindowTitle(), CFuiGroupBox::Draw(), CFuiTextField::Draw(), CFuiLabel::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CFuiPopupMenu::Draw(), CFuiButton::Draw(), CFuiWindowTitle::Draw(), Read(), and ReadFinished().

Tag CFuiComponent::fontTag [protected]
 

Definition at line 272 of file Fui.h.

Referenced by CFuiComponent(), Read(), and ReadFinished().

int CFuiComponent::h [protected]
 

Definition at line 269 of file Fui.h.

Referenced by CFuiSlider::Draw(), CFuiLine::Draw(), CFuiWindowTitle::Draw(), CFuiWindowTitle::Fill(), MakeSurface(), MouseHit(), Read(), CFuiTextField::ReadFinished(), and CFuiWindow::ReadFinished().

Tag CFuiComponent::id [protected]
 

Definition at line 262 of file Fui.h.

Referenced by GetId().

Tag CFuiComponent::parentWindowId [protected]
 

Definition at line 259 of file Fui.h.

Referenced by CFuiComponent(), CFuiRadioButton::MouseStopClick(), CFuiCheckbox::MouseStopClick(), and CFuiButton::MouseStopClick().

int CFuiComponent::show [protected]
 

Definition at line 271 of file Fui.h.

Referenced by CFuiComponent(), Draw(), Hide(), Read(), and Show().

SSurface* CFuiComponent::surface [protected]
 

Definition at line 275 of file Fui.h.

Referenced by CFuiComponent(), CFuiWindow::CFuiWindow(), CFuiList::Draw(), CFuiGroupBox::Draw(), CFuiSlider::Draw(), CFuiLine::Draw(), CFuiTextField::Draw(), CFuiLabel::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CFuiPopupMenu::Draw(), CFuiButton::Draw(), CFuiWindow::Draw(), CFuiWindowTitle::Draw(), Draw(), CFuiPicture::DrawNoTiling(), CFuiPicture::DrawTiledBitmap(), MakeSurface(), SetParentPosition(), SetPosition(), SetSize(), and CFuiWindow::~CFuiWindow().

char CFuiComponent::text[256] [protected]
 

Definition at line 266 of file Fui.h.

Referenced by CFuiComponent(), CFuiLabel::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CFuiButton::Draw(), CFuiWindowTitle::Draw(), GetText(), Read(), and CFuiWindow::ReadFinished().

EFuiComponentTypes CFuiComponent::type [protected]
 

Definition at line 261 of file Fui.h.

Referenced by CFuiButton::CFuiButton(), CFuiCheckbox::CFuiCheckbox(), CFuiCloseButton::CFuiCloseButton(), CFuiComponent(), CFuiMinimizeButton::CFuiMinimizeButton(), CFuiPopupMenu::CFuiPopupMenu(), CFuiRadioButton::CFuiRadioButton(), CFuiWindow::CFuiWindow(), and CFuiZoomButton::CFuiZoomButton().

int CFuiComponent::w [protected]
 

Definition at line 269 of file Fui.h.

Referenced by CFuiSlider::Draw(), CFuiLine::Draw(), CFuiLabel::Draw(), CFuiWindowTitle::Draw(), CFuiWindowTitle::Fill(), MakeSurface(), Read(), CFuiTextField::ReadFinished(), CFuiPopupMenu::ReadFinished(), and CFuiWindow::ReadFinished().

char CFuiComponent::widgetName[64] [protected]
 

Definition at line 264 of file Fui.h.

Referenced by CFuiButton::CFuiButton(), CFuiCheckbox::CFuiCheckbox(), CFuiCloseButton::CFuiCloseButton(), CFuiComponent(), CFuiMinimizeButton::CFuiMinimizeButton(), CFuiRadioButton::CFuiRadioButton(), CFuiWindowTitle::CFuiWindowTitle(), CFuiZoomButton::CFuiZoomButton(), CFuiZoomButton::Fill(), CFuiMinimizeButton::Fill(), CFuiCloseButton::Fill(), CFuiWindowTitle::Fill(), Read(), CFuiTextField::ReadFinished(), CFuiLabel::ReadFinished(), CFuiRadioButton::ReadFinished(), CFuiCheckbox::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiButton::ReadFinished(), and CFuiWindow::ReadFinished().

Tag CFuiComponent::widgetTag [protected]
 

Definition at line 265 of file Fui.h.

Referenced by CFuiButton::CFuiButton(), CFuiCheckbox::CFuiCheckbox(), CFuiCloseButton::CFuiCloseButton(), CFuiComponent(), CFuiMinimizeButton::CFuiMinimizeButton(), CFuiRadioButton::CFuiRadioButton(), CFuiWindowTitle::CFuiWindowTitle(), CFuiZoomButton::CFuiZoomButton(), CFuiZoomButton::Fill(), CFuiMinimizeButton::Fill(), CFuiCloseButton::Fill(), CFuiWindowTitle::Fill(), Read(), CFuiList::ReadFinished(), CFuiTextField::ReadFinished(), CFuiLabel::ReadFinished(), CFuiRadioButton::ReadFinished(), CFuiCheckbox::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiButton::ReadFinished(), and CFuiWindow::ReadFinished().

int CFuiComponent::x [protected]
 

Definition at line 268 of file Fui.h.

Referenced by CFuiLine::Draw(), CFuiZoomButton::Fill(), CFuiMinimizeButton::Fill(), CFuiCloseButton::Fill(), MakeSurface(), MouseHit(), CFuiWindow::MouseMove(), CFuiGroupBox::Read(), CFuiWindow::Read(), Read(), CFuiTextField::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiButton::ReadFinished(), CFuiWindow::ReadFinished(), CFuiList::SetParentPosition(), CFuiPopupMenu::SetParentPosition(), CFuiButton::SetParentPosition(), CFuiZoomButton::SetParentPosition(), CFuiMinimizeButton::SetParentPosition(), CFuiCloseButton::SetParentPosition(), CFuiWindowTitle::SetParentPosition(), SetParentPosition(), CFuiWindow::SetPosition(), and SetSize().

int CFuiComponent::xParent [protected]
 

Definition at line 267 of file Fui.h.

Referenced by CFuiComponent(), MakeSurface(), MouseHit(), SetPosition(), and SetSize().

int CFuiComponent::y [protected]
 

Definition at line 268 of file Fui.h.

Referenced by CFuiLine::Draw(), CFuiLabel::Draw(), CFuiZoomButton::Fill(), CFuiMinimizeButton::Fill(), CFuiCloseButton::Fill(), MakeSurface(), MouseHit(), CFuiWindow::MouseMove(), CFuiGroupBox::Read(), CFuiWindow::Read(), Read(), CFuiTextField::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiButton::ReadFinished(), CFuiWindow::ReadFinished(), CFuiList::SetParentPosition(), CFuiPopupMenu::SetParentPosition(), CFuiButton::SetParentPosition(), CFuiZoomButton::SetParentPosition(), CFuiMinimizeButton::SetParentPosition(), CFuiCloseButton::SetParentPosition(), CFuiWindowTitle::SetParentPosition(), SetParentPosition(), CFuiWindow::SetPosition(), and SetSize().

int CFuiComponent::yParent [protected]
 

Definition at line 267 of file Fui.h.

Referenced by CFuiComponent(), MakeSurface(), MouseHit(), SetPosition(), and SetSize().


The documentation for this class was generated from the following files:
SourceForge.net Logo Documentation generated by doxygen