xoreos  0.0.5
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Engines::KotORJadeWidget Class Reference

#include <kotorjadewidget.h>

Inheritance diagram for Engines::KotORJadeWidget:
Inheritance graph
[legend]
Collaboration diagram for Engines::KotORJadeWidget:
Collaboration graph
[legend]

Classes

struct  Border
 
struct  Extend
 
struct  Hilight
 
struct  Text
 

Public Member Functions

 KotORJadeWidget (GUI &gui, const Common::UString &tag)
 
 ~KotORJadeWidget ()
 
virtual void load (const Aurora::GFF3Struct &gff)
 
void setClickable (bool clickable)
 Set the widget clickable, or not clickable. More...
 
void setScissor (int x, int y, int width, int height)
 Create a scissor test over this widget. More...
 
void setFill (const Common::UString &fill)
 
void setColor (float r, float g, float b, float a)
 
void setBorderColor (float r, float g, float b, float a)
 
void setWrapped (bool wrapped)
 
void setSubScene (Graphics::Aurora::SubSceneQuad *subscene)
 
float getBorderDimension () const
 
void setHighlight (const Common::UString &hilight)
 
void setHighlight (bool highlight)
 Set if the widget should be highlighted. More...
 
bool isHighlight ()
 If the widget is highlighted. More...
 
void createText (const Common::UString &font, const Common::UString &str)
 Initialize the text within this widget. More...
 
void setFont (const Common::UString &fnt)
 Change the font for this widget. More...
 
void setText (const Common::UString &text)
 
void setTextColor (float r, float g, float b, float a)
 
void setHorizontalTextAlign (float halign)
 
void setVerticalTextAlign (float valign)
 
float getTextHeight (const Common::UString &text) const
 
void setTag (const Common::UString &tag)
 Set the widget's tag. More...
 
virtual void show ()
 Show the widget. More...
 
virtual void hide ()
 Hide the widget. More...
 
virtual void setPosition (float x, float y, float z)
 Set the widget's position. More...
 
virtual void setRotation (float angle)
 Set the rotation of the widget in degrees. More...
 
virtual void setWidth (float width)
 Set the width of the widget. More...
 
virtual void setHeight (float height)
 Set the height of the widget. More...
 
float getWidth () const
 Get the widget's width. More...
 
float getHeight () const
 Get the widget's height. More...
 
virtual void setInvisible (bool invisible)
 Make the widget invisible. More...
 
- Public Member Functions inherited from Engines::Widget
 Widget (GUI &gui, const Common::UString &tag)
 
virtual ~Widget ()
 
const Common::UStringgetTag () const
 Get the widget's tag. More...
 
bool isActive () const
 Was the widget activated? More...
 
bool isVisible () const
 Is the widget visible? More...
 
bool isDisabled () const
 Is the widget disabled? More...
 
bool isInvisible () const
 Is the widget invisible (never visible)? More...
 
WidgetgetParent ()
 
const WidgetgetParent () const
 
WidgetgetChild (const Common::UString &childTag)
 Get the widget's child by tag. More...
 
virtual void movePosition (float x, float y, float z)
 Move the widget, relative to its current position. More...
 
virtual void getPosition (float &x, float &y, float &z) const
 Get the widget's position. More...
 
virtual void setDisabled (bool disabled)
 Disable/Enable the widget. More...
 
virtual void enter ()
 The mouse entered the widget. More...
 
virtual void leave ()
 The mouse left the widget. More...
 
virtual void mouseMove (uint8 state, float x, float y)
 The mouse was moved over the widget. More...
 
virtual void mouseDown (uint8 state, float x, float y)
 A mouse button was pressed on the widget. More...
 
virtual void mouseUp (uint8 state, float x, float y)
 A mouse button was released on the widget. More...
 
virtual void mouseWheel (uint8 state, int x, int y)
 A mouse wheel was used on the widget. More...
 
virtual void mouseDblClick (uint8 state, float x, float y)
 A mouse button was double-clicked on the widget. More...
 
virtual void subActive (Widget &widget)
 A sub-widget was activated. More...
 
void remove ()
 Remove the widget from the GUI. More...
 
virtual void addSub (Widget &widget)
 Add a sub-widget to the widget. More...
 
virtual void addChild (Widget &widget)
 Add a child to the widget. More...
 
virtual void addGroupMember (Widget &widget)
 Add a fellow group member to the widget. More...
 
virtual void removeSub (Widget &widget)
 Remove a sub-widget from the widget. More...
 
virtual void removeChild (Widget &widget)
 Remove a child from the widget. More...
 
virtual void removeGroupMember (Widget &widget)
 Remove fellow group member from the widget. More...
 

Protected Member Functions

Graphics::Aurora::HighlightablegetTextHighlightableComponent () const
 
Graphics::Aurora::HighlightablegetQuadHighlightableComponent () const
 
Extend createExtend (const Aurora::GFF3Struct &gff)
 
Border createBorder (const Aurora::GFF3Struct &gff)
 
Text createText (const Aurora::GFF3Struct &gff)
 
Hilight createHilight (const Aurora::GFF3Struct &gff)
 
- Protected Member Functions inherited from Engines::Widget
virtual void signalGroupMemberActive ()
 A fellow group member signaled that it is now active. More...
 
void setActive (bool active)
 The widget's active state. More...
 
void raiseCallbackActive (Widget &widget)
 

Protected Attributes

float _width
 
float _height
 
uint32 _borderDimension
 
float _r
 
float _g
 
float _b
 
float _a
 
float _unselectedR
 
float _unselectedG
 
float _unselectedB
 
float _unselectedA
 
bool _wrapped
 
Common::ScopedPtr< Graphics::Aurora::GUIQuad_quad
 
Common::ScopedPtr< Graphics::Aurora::GUIQuad_highlight
 
Common::ScopedPtr< Graphics::Aurora::HighlightableText_text
 
Common::ScopedPtr< Graphics::Aurora::BorderQuad_border
 
Graphics::Aurora::SubSceneQuad_subScene
 
bool _highlighted
 
- Protected Attributes inherited from Engines::Widget
GUI_gui
 The GUI the widget belongs to. More...
 
Common::UString _tag
 The widget's tag. More...
 
Widget_parent
 The widget's parent, if any. More...
 
Widget_owner
 The widget's owner, if any. More...
 
std::list< Widget * > _subWidgets
 The widget's sub-widgets. More...
 
std::list< Widget * > _children
 The widget's children. More...
 
std::list< Widget * > _groupMembers
 The widget's fellow group members. More...
 

Detailed Description

Definition at line 43 of file kotorjadewidget.h.

Constructor & Destructor Documentation

◆ KotORJadeWidget()

Engines::KotORJadeWidget::KotORJadeWidget ( GUI gui,
const Common::UString tag 
)

Definition at line 70 of file kotorjadewidget.cpp.

◆ ~KotORJadeWidget()

Engines::KotORJadeWidget::~KotORJadeWidget ( )

Definition at line 83 of file kotorjadewidget.cpp.

Member Function Documentation

◆ createBorder()

KotORJadeWidget::Border Engines::KotORJadeWidget::createBorder ( const Aurora::GFF3Struct gff)
protected

◆ createExtend()

KotORJadeWidget::Extend Engines::KotORJadeWidget::createExtend ( const Aurora::GFF3Struct gff)
protected

◆ createHilight()

KotORJadeWidget::Hilight Engines::KotORJadeWidget::createHilight ( const Aurora::GFF3Struct gff)
protected

Definition at line 595 of file kotorjadewidget.cpp.

References Engines::KotORJadeWidget::Hilight::fill, Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getStruct(), and Aurora::GFF3Struct::hasField().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createText() [1/2]

void Engines::KotORJadeWidget::createText ( const Common::UString font,
const Common::UString str 
)

Initialize the text within this widget.

Definition at line 321 of file kotorjadewidget.cpp.

References _height, _text, _width, FontMan, Graphics::Aurora::FontHandle::getFont(), Graphics::Font::getHeight(), Engines::Widget::getPosition(), Engines::Widget::getTag(), Graphics::Font::getWidth(), MAX(), and Common::ScopedPtrBase< T, Deallocator >::reset().

Referenced by load(), and Engines::KotOR::OptionsMenu::OptionsMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createText() [2/2]

KotORJadeWidget::Text Engines::KotORJadeWidget::createText ( const Aurora::GFF3Struct gff)
protected

◆ getBorderDimension()

float Engines::KotORJadeWidget::getBorderDimension ( ) const

Definition at line 240 of file kotorjadewidget.cpp.

References _borderDimension.

Referenced by Engines::WidgetListBox::positionItemWidgets().

Here is the caller graph for this function:

◆ getHeight()

float Engines::KotORJadeWidget::getHeight ( ) const
virtual

◆ getQuadHighlightableComponent()

Graphics::Aurora::Highlightable * Engines::KotORJadeWidget::getQuadHighlightableComponent ( ) const
protected

◆ getTextHeight()

float Engines::KotORJadeWidget::getTextHeight ( const Common::UString text) const

Definition at line 365 of file kotorjadewidget.cpp.

References _text.

Referenced by Engines::WidgetListBox::refreshItemWidgets().

Here is the caller graph for this function:

◆ getTextHighlightableComponent()

Graphics::Aurora::Highlightable * Engines::KotORJadeWidget::getTextHighlightableComponent ( ) const
protected

Definition at line 517 of file kotorjadewidget.cpp.

References _text, and Common::ScopedPtrBase< T, Deallocator >::get().

Referenced by Engines::WidgetCheckBox::enter(), Engines::WidgetCheckBox::leave(), Engines::WidgetCheckBox::load(), Engines::WidgetButton::load(), Engines::WidgetProtoItem::load(), and setHighlight().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWidth()

float Engines::KotORJadeWidget::getWidth ( ) const
virtual

◆ hide()

void Engines::KotORJadeWidget::hide ( )
virtual

◆ isHighlight()

bool Engines::KotORJadeWidget::isHighlight ( )

If the widget is highlighted.

Definition at line 317 of file kotorjadewidget.cpp.

References _highlighted.

◆ load()

void Engines::KotORJadeWidget::load ( const Aurora::GFF3Struct gff)
virtual

Reimplemented in Engines::WidgetListBox, Engines::WidgetProtoItem, Engines::WidgetPanel, Engines::WidgetProgressbar, Engines::KotORInventoryItem, Engines::WidgetButton, Engines::WidgetCheckBox, Engines::WidgetLabel, Engines::WidgetScrollbar, and Engines::WidgetSlider.

Definition at line 86 of file kotorjadewidget.cpp.

References _a, _b, _border, _borderDimension, _g, _height, _highlight, _quad, _r, _text, _width, Engines::KotORJadeWidget::Border::b, Engines::KotORJadeWidget::Text::b, Engines::KotORJadeWidget::Border::corner, createBorder(), createExtend(), createHilight(), createText(), Engines::KotORJadeWidget::Border::dimension, Engines::KotORJadeWidget::Border::edge, Common::UString::empty(), Engines::KotORJadeWidget::Border::fill, Engines::KotORJadeWidget::Hilight::fill, Engines::KotORJadeWidget::Text::font, FontMan, Engines::KotORJadeWidget::Border::g, Engines::KotORJadeWidget::Text::g, Aurora::GFF3Struct::getDouble(), Graphics::Aurora::FontHandle::getFont(), Graphics::Font::getHeight(), Engines::Widget::getTag(), Aurora::GFF3Struct::getVector(), Engines::KotORJadeWidget::Extend::h, Engines::KotORJadeWidget::Text::halign, Engines::KotORJadeWidget::Border::hasColor, Engines::KotORJadeWidget::Border::r, Engines::KotORJadeWidget::Text::r, Common::ScopedPtrBase< T, Deallocator >::reset(), Engines::Widget::setPosition(), Engines::KotORJadeWidget::Text::text, Engines::KotORJadeWidget::Text::valign, Engines::KotORJadeWidget::Extend::w, Engines::KotORJadeWidget::Extend::x, and Engines::KotORJadeWidget::Extend::y.

Referenced by Engines::Jade::GUI::createWidget(), Engines::KotOR::GUI::createWidget(), Engines::WidgetScrollbar::load(), Engines::WidgetSlider::load(), Engines::WidgetLabel::load(), Engines::WidgetCheckBox::load(), Engines::WidgetButton::load(), Engines::WidgetProgressbar::load(), Engines::WidgetPanel::load(), Engines::WidgetListBox::load(), and Engines::WidgetProtoItem::load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBorderColor()

void Engines::KotORJadeWidget::setBorderColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 207 of file kotorjadewidget.cpp.

References _border.

Referenced by Engines::KotOR::PartySelectionGUI::onSelectionChanged().

Here is the caller graph for this function:

◆ setClickable()

void Engines::KotORJadeWidget::setClickable ( bool  clickable)

Set the widget clickable, or not clickable.

Definition at line 162 of file kotorjadewidget.cpp.

References _highlight, _quad, and _text.

Referenced by setInvisible().

Here is the caller graph for this function:

◆ setColor()

void Engines::KotORJadeWidget::setColor ( float  r,
float  g,
float  b,
float  a 
)

◆ setFill()

void Engines::KotORJadeWidget::setFill ( const Common::UString fill)

◆ setFont()

void Engines::KotORJadeWidget::setFont ( const Common::UString fnt)

Change the font for this widget.

Definition at line 340 of file kotorjadewidget.cpp.

References _text.

◆ setHeight()

void Engines::KotORJadeWidget::setHeight ( float  height)
virtual

◆ setHighlight() [1/2]

void Engines::KotORJadeWidget::setHighlight ( const Common::UString hilight)

◆ setHighlight() [2/2]

void Engines::KotORJadeWidget::setHighlight ( bool  highlight)

◆ setHorizontalTextAlign()

void Engines::KotORJadeWidget::setHorizontalTextAlign ( float  halign)

Definition at line 355 of file kotorjadewidget.cpp.

References _text.

Referenced by Engines::KotOR::DialogGUIBase::update().

Here is the caller graph for this function:

◆ setInvisible()

void Engines::KotORJadeWidget::setInvisible ( bool  invisible)
virtual

◆ setPosition()

void Engines::KotORJadeWidget::setPosition ( float  x,
float  y,
float  z 
)
virtual

◆ setRotation()

void Engines::KotORJadeWidget::setRotation ( float  angle)
virtual

Set the rotation of the widget in degrees.

Definition at line 443 of file kotorjadewidget.cpp.

References _quad.

◆ setScissor()

void Engines::KotORJadeWidget::setScissor ( int  x,
int  y,
int  width,
int  height 
)

Create a scissor test over this widget.

Definition at line 171 of file kotorjadewidget.cpp.

References _quad.

Referenced by Engines::KotOR::CustomCharPanel::CustomCharPanel(), Engines::KotOR::QuickCharPanel::QuickCharPanel(), and Engines::KotOR::QuickOrCustomPanel::QuickOrCustomPanel().

Here is the caller graph for this function:

◆ setSubScene()

void Engines::KotORJadeWidget::setSubScene ( Graphics::Aurora::SubSceneQuad subscene)

◆ setTag()

void Engines::KotORJadeWidget::setTag ( const Common::UString tag)
virtual

Set the widget's tag.

Reimplemented from Engines::Widget.

Definition at line 369 of file kotorjadewidget.cpp.

References _quad, _text, Engines::Widget::getTag(), and Engines::Widget::setTag().

Here is the call graph for this function:

◆ setText()

void Engines::KotORJadeWidget::setText ( const Common::UString text)

Definition at line 345 of file kotorjadewidget.cpp.

References _text.

Referenced by Engines::KotOR::CharacterGenerationNameMenu::callbackActive(), Engines::KotOR2::CharacterGenerationNameMenu::callbackActive(), Engines::KotOR::CharacterGenerationNameMenu::callbackKeyInput(), Engines::KotOR2::CharacterGenerationNameMenu::callbackKeyInput(), Engines::KotOR2::ClassSelection::callbackRun(), Engines::KotOR::MenuEquipment::callbackRun(), Engines::KotOR::ClassSelectionMenu::callbackRun(), Engines::KotOR::CharacterGenerationNameMenu::callbackTextInput(), Engines::KotOR2::CharacterGenerationNameMenu::callbackTextInput(), Engines::KotOR2::CharacterGeneration::CharacterGeneration(), Engines::KotOR::CharacterGenerationMenu::CharacterGenerationMenu(), Engines::KotOR2::ClassSelection::ClassSelection(), Engines::KotOR::ClassSelectionMenu::ClassSelectionMenu(), Engines::KotOR::ContainerMenu::fillFromInventory(), Engines::KotOR::MenuEquipment::fixateOnSlot(), Engines::KotOR::LoadScreen::LoadScreen(), Engines::KotOR::MenuEquipment::MenuEquipment(), Engines::KotOR::PartySelectionGUI::onSelectionChanged(), Engines::KotOR::DialogGUIBase::refresh(), Engines::KotOR::SaveLoadMenu::SaveLoadMenu(), Engines::KotOR::MenuMap::setReturnStrref(), Engines::KotOR2::CharacterGeneration::showName(), Engines::KotOR::CharacterGenerationMenu::showName(), Engines::KotOR::OptionsGraphicsAdvancedMenu::updateAnisotropy(), Engines::KotOR::OptionsGraphicsAdvancedMenu::updateAntiAliasing(), Engines::KotOR::OptionsGameplayMenu::updateDifficulty(), Engines::KotOR::OptionsSoundAdvancedMenu::updateEAX(), and Engines::KotOR::OptionsGraphicsAdvancedMenu::updateTextureQuality().

Here is the caller graph for this function:

◆ setTextColor()

void Engines::KotORJadeWidget::setTextColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 350 of file kotorjadewidget.cpp.

References _text.

Referenced by Engines::KotOR::OptionsMenu::OptionsMenu(), and Engines::KotOR::DialogGUIBase::update().

Here is the caller graph for this function:

◆ setVerticalTextAlign()

void Engines::KotORJadeWidget::setVerticalTextAlign ( float  valign)

Definition at line 360 of file kotorjadewidget.cpp.

References _text.

Referenced by Engines::KotOR::DialogGUIBase::update().

Here is the caller graph for this function:

◆ setWidth()

void Engines::KotORJadeWidget::setWidth ( float  width)
virtual

◆ setWrapped()

void Engines::KotORJadeWidget::setWrapped ( bool  wrapped)

Definition at line 212 of file kotorjadewidget.cpp.

References _wrapped.

Referenced by Engines::KotOR2::ClassSelection::ClassSelection(), and Engines::KotOR::ClassSelectionMenu::ClassSelectionMenu().

Here is the caller graph for this function:

◆ show()

void Engines::KotORJadeWidget::show ( )
virtual

Member Data Documentation

◆ _a

float Engines::KotORJadeWidget::_a
protected

Definition at line 166 of file kotorjadewidget.h.

Referenced by load().

◆ _b

float Engines::KotORJadeWidget::_b
protected

Definition at line 166 of file kotorjadewidget.h.

Referenced by load().

◆ _border

Common::ScopedPtr<Graphics::Aurora::BorderQuad> Engines::KotORJadeWidget::_border
protected

◆ _borderDimension

uint32 Engines::KotORJadeWidget::_borderDimension
protected

◆ _g

float Engines::KotORJadeWidget::_g
protected

Definition at line 166 of file kotorjadewidget.h.

Referenced by load().

◆ _height

float Engines::KotORJadeWidget::_height
protected

◆ _highlight

Common::ScopedPtr<Graphics::Aurora::GUIQuad> Engines::KotORJadeWidget::_highlight
protected

◆ _highlighted

bool Engines::KotORJadeWidget::_highlighted
protected

Definition at line 178 of file kotorjadewidget.h.

Referenced by isHighlight(), and setHighlight().

◆ _quad

Common::ScopedPtr<Graphics::Aurora::GUIQuad> Engines::KotORJadeWidget::_quad
protected

◆ _r

float Engines::KotORJadeWidget::_r
protected

Definition at line 166 of file kotorjadewidget.h.

Referenced by load().

◆ _subScene

Graphics::Aurora::SubSceneQuad* Engines::KotORJadeWidget::_subScene
protected

Definition at line 176 of file kotorjadewidget.h.

Referenced by hide(), setSubScene(), and show().

◆ _text

Common::ScopedPtr<Graphics::Aurora::HighlightableText> Engines::KotORJadeWidget::_text
protected

◆ _unselectedA

float Engines::KotORJadeWidget::_unselectedA
protected

Definition at line 167 of file kotorjadewidget.h.

Referenced by setHighlight().

◆ _unselectedB

float Engines::KotORJadeWidget::_unselectedB
protected

Definition at line 167 of file kotorjadewidget.h.

Referenced by setHighlight().

◆ _unselectedG

float Engines::KotORJadeWidget::_unselectedG
protected

Definition at line 167 of file kotorjadewidget.h.

Referenced by setHighlight().

◆ _unselectedR

float Engines::KotORJadeWidget::_unselectedR
protected

Definition at line 167 of file kotorjadewidget.h.

Referenced by setHighlight().

◆ _width

float Engines::KotORJadeWidget::_width
protected

◆ _wrapped

bool Engines::KotORJadeWidget::_wrapped
protected

Definition at line 169 of file kotorjadewidget.h.

Referenced by setWrapped().


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