hoa_video::private_video::GUIControl Class Reference

GUIControl is a type of GUI element, specifically for controls. This is for functions that controls have, but menu windows don't have, such as the SetOwner() function. More...

#include <gui.h>

Inheritance diagram for hoa_video::private_video::GUIControl:

Inheritance graph
[legend]
Collaboration diagram for hoa_video::private_video::GUIControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GUIControl ()
virtual void SetOwner (MenuWindow *owner_window)
 Sets the menu window which "owns" this control.
virtual ~GUIControl ()

Protected Member Functions

virtual void CalculateAlignedRect (float &left, float &right, float &bottom, float &top)
 Calculates and returns the four edges for an aligned rectangle.

Protected Attributes

MenuWindow_owner
 A pointer to the menu which owns this control. When the owner is set to NULL, the control can draw to any part of the screen (so scissoring is ignored) and drawing coordinates are not modified.

Detailed Description

GUIControl is a type of GUI element, specifically for controls. This is for functions that controls have, but menu windows don't have, such as the SetOwner() function.

****************************************************************************

Definition at line 132 of file gui.h.


Constructor & Destructor Documentation

hoa_video::private_video::GUIControl::GUIControl (  )  [inline]

Definition at line 134 of file gui.h.

References _owner.

virtual hoa_video::private_video::GUIControl::~GUIControl (  )  [inline, virtual]

Definition at line 137 of file gui.h.


Member Function Documentation

void hoa_video::private_video::GUIControl::CalculateAlignedRect ( float &  left,
float &  right,
float &  bottom,
float &  top 
) [protected, virtual]

Calculates and returns the four edges for an aligned rectangle.

Parameters:
left A reference where to store the coordinates of the rectangle's left edge.
right A reference where to store the coordinates of the rectangle's right edge.
bottom A reference where to store the coordinates of the rectangle's bttom edge.
top A reference where to store the coordinates of the rectangle's top edge.
Note:
The difference between this function and the one for GUI elements is that controls must take their owner window into account.

Reimplemented from hoa_video::private_video::GUIElement.

Definition at line 90 of file gui.cpp.

References _owner, hoa_video::private_video::GUIElement::CalculateAlignedRect(), hoa_video::private_video::GUIElement::GetAlignment(), hoa_video::MenuWindow::GetDimensions(), hoa_video::GameVideo::PopState(), hoa_video::GameVideo::PushState(), hoa_video::GameVideo::SetDrawFlags(), and hoa_video::VideoManager.

Referenced by hoa_video::TextBox::Draw(), and hoa_video::OptionBox::Draw().

Here is the call graph for this function:

virtual void hoa_video::private_video::GUIControl::SetOwner ( MenuWindow owner_window  )  [inline, virtual]

Sets the menu window which "owns" this control.

Parameters:
owner_window A pointer to the menu that owns the control.
Note:
If the control is not owned by any menu window, then set the owner to NULL. When a control is owned by a menu, it means that it obeys the menu's scissoring rectangle so that the control won't be drawn outside of the bounds of the menu. It also means that the position of the control is relative to the position of the window. (i.e. control.position += menu.position).

Definition at line 148 of file gui.h.

References _owner.

Referenced by hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_menu::private_menu::InventoryWindow::InventoryWindow(), hoa_shop::private_shop::ObjectInfoWindow::ObjectInfoWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), hoa_boot::BootMenu::SetWindowed(), hoa_shop::private_shop::ShopActionWindow::ShopActionWindow(), and hoa_menu::private_menu::SkillsWindow::SkillsWindow().


Member Data Documentation

MenuWindow* hoa_video::private_video::GUIControl::_owner [protected]

A pointer to the menu which owns this control. When the owner is set to NULL, the control can draw to any part of the screen (so scissoring is ignored) and drawing coordinates are not modified.

Definition at line 156 of file gui.h.

Referenced by CalculateAlignedRect(), hoa_video::OptionBox::Draw(), GUIControl(), and SetOwner().


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 23:16:45 2007 for Hero of Allacrost by  doxygen 1.5.1