xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::WidgetProgressbar Class Reference

#include <progressbar.h>

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

Public Member Functions

 WidgetProgressbar (GUI &gui, const Common::UString &tag)
 
 ~WidgetProgressbar ()
 
void show ()
 Show the widget. More...
 
void hide ()
 Hide the widget. More...
 
void load (const Aurora::GFF3Struct &gff)
 
void setPosition (float x, float y, float z)
 Set the widget's position. More...
 
void setCurrentValue (int curValue)
 Set the current progress bar value. More...
 
void setMaxValue (int maxValue)
 Set the max progress bar value. More...
 
int getCurrentValue ()
 Get the current progress bar value. More...
 
int getMaxValue ()
 Get the max progress bar value. More...
 
- Public Member Functions inherited from Engines::KotORJadeWidget
 KotORJadeWidget (GUI &gui, const Common::UString &tag)
 
 ~KotORJadeWidget ()
 
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 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...
 

Private Member Functions

void update ()
 

Private Attributes

Common::ScopedPtr< Graphics::Aurora::GUIQuad_progress
 
int _maxValue
 
int _curValue
 
bool _horizontal
 

Additional Inherited Members

- Protected Member Functions inherited from Engines::KotORJadeWidget
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 inherited from Engines::KotORJadeWidget
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 34 of file progressbar.h.

Constructor & Destructor Documentation

◆ WidgetProgressbar()

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

Definition at line 33 of file progressbar.cpp.

◆ ~WidgetProgressbar()

Engines::WidgetProgressbar::~WidgetProgressbar ( )

Definition at line 40 of file progressbar.cpp.

Member Function Documentation

◆ getCurrentValue()

int Engines::WidgetProgressbar::getCurrentValue ( )

Get the current progress bar value.

Definition at line 110 of file progressbar.cpp.

References _curValue.

◆ getMaxValue()

int Engines::WidgetProgressbar::getMaxValue ( )

Get the max progress bar value.

Definition at line 114 of file progressbar.cpp.

References _maxValue.

◆ hide()

void Engines::WidgetProgressbar::hide ( )
virtual

Hide the widget.

Reimplemented from Engines::KotORJadeWidget.

Definition at line 90 of file progressbar.cpp.

References _progress, Engines::KotORJadeWidget::hide(), and Engines::Widget::isVisible().

Referenced by Engines::KotOR::HUD::setPortrait().

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

◆ load()

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

◆ setCurrentValue()

void Engines::WidgetProgressbar::setCurrentValue ( int  curValue)

Set the current progress bar value.

Definition at line 100 of file progressbar.cpp.

References _curValue, and update().

Referenced by Engines::KotOR::LoadScreen::LoadScreen(), and Engines::KotOR::LoadScreen::setLoadingProgress().

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

◆ setMaxValue()

void Engines::WidgetProgressbar::setMaxValue ( int  maxValue)

Set the max progress bar value.

Definition at line 105 of file progressbar.cpp.

References _maxValue, and update().

Here is the call graph for this function:

◆ setPosition()

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

Set the widget's position.

Reimplemented from Engines::KotORJadeWidget.

Definition at line 64 of file progressbar.cpp.

References _progress, Engines::Widget::getPosition(), and Engines::KotORJadeWidget::setPosition().

Here is the call graph for this function:

◆ show()

void Engines::WidgetProgressbar::show ( )
virtual

Show the widget.

Reimplemented from Engines::KotORJadeWidget.

Definition at line 80 of file progressbar.cpp.

References _progress, Engines::Widget::isInvisible(), Engines::Widget::isVisible(), and Engines::KotORJadeWidget::show().

Referenced by Engines::KotOR::HUD::setPortrait().

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

◆ update()

void Engines::WidgetProgressbar::update ( )
private

Definition at line 118 of file progressbar.cpp.

References _curValue, Engines::KotORJadeWidget::_height, _horizontal, _maxValue, _progress, and Engines::KotORJadeWidget::_width.

Referenced by load(), setCurrentValue(), and setMaxValue().

Here is the caller graph for this function:

Member Data Documentation

◆ _curValue

int Engines::WidgetProgressbar::_curValue
private

Definition at line 62 of file progressbar.h.

Referenced by getCurrentValue(), load(), setCurrentValue(), and update().

◆ _horizontal

bool Engines::WidgetProgressbar::_horizontal
private

Definition at line 64 of file progressbar.h.

Referenced by load(), and update().

◆ _maxValue

int Engines::WidgetProgressbar::_maxValue
private

Definition at line 61 of file progressbar.h.

Referenced by getMaxValue(), load(), setMaxValue(), and update().

◆ _progress

Common::ScopedPtr<Graphics::Aurora::GUIQuad> Engines::WidgetProgressbar::_progress
private

Definition at line 59 of file progressbar.h.

Referenced by hide(), load(), setPosition(), show(), and update().


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