|
xoreos
0.0.5
|
A NWN scrollbar model. More...
#include <scrollbar.h>


Classes | |
| struct | Quad |
Public Types | |
| enum | Type { kTypeVertical, kTypeHorizontal } |
Public Types inherited from Graphics::GUIElement | |
| enum | GUIElementType { kGUIElementFront = kRenderableTypeGUIFront, kGUIElementBack = kRenderableTypeGUIBack, kGUIElementConsole = kRenderableTypeConsole } |
Public Member Functions | |
| Scrollbar (Type type) | |
| ~Scrollbar () | |
| void | setPosition (float x, float y, float z) |
| Set the current position of the scrollbar. More... | |
| void | getPosition (float &x, float &y, float &z) const |
| Get the current position of the scrollbar. More... | |
| bool | isIn (float x, float y) const |
| Is the point within the scrollbar? More... | |
| void | setLength (float length) |
| Set the scrollbar length. More... | |
| float | getWidth () const |
| Get the scrollbar's width. More... | |
| float | getHeight () const |
| Get the scrollbar's height. More... | |
| void | calculateDistance () |
| Calculate the object's distance. More... | |
| void | render (Graphics::RenderPass pass) |
| Render the object. More... | |
Public Member Functions inherited from Graphics::GUIElement | |
| GUIElement (GUIElementType type) | |
| ~GUIElement () | |
Public Member Functions inherited from Graphics::Renderable | |
| Renderable (RenderableType type) | |
| ~Renderable () | |
| bool | operator< (const Queueable &q) const |
| virtual void | advanceTime (float dt) |
| Advance time (used by renderables with animations). More... | |
| virtual void | renderImmediate (const glm::mat4 &parentTransform) |
| For shader based systems, don't sort anything, render this right_now. More... | |
| virtual void | queueRender (const glm::mat4 &parentTransform) |
| Queue the object for later rendering. More... | |
| double | getDistance () const |
| Get the distance of the object from the viewer. More... | |
| uint32 | getID () const |
| Get the object's unique ID. More... | |
| bool | isClickable () const |
| Is the object clickable? More... | |
| void | setClickable (bool clickable) |
| Set the object's clickable state. More... | |
| const Common::UString & | getTag () const |
| Get the object's tag. More... | |
| void | setTag (const Common::UString &tag) |
| Set the object's tag. More... | |
| bool | isVisible () const |
| Is the object visible? More... | |
| virtual void | show () |
| Show the object. More... | |
| virtual void | hide () |
| Hide the object. More... | |
| virtual bool | isIn (float x, float y, float z) const |
| Is that point within the object? More... | |
| virtual bool | isIn (float x1, float y1, float z1, float x2, float y2, float z2) const |
| Does the line from x1.y1.z1 to x2.y2.z2 intersect with the object? More... | |
Public Member Functions inherited from Graphics::Queueable | |
| Queueable () | |
| virtual | ~Queueable () |
Private Member Functions | |
| void | createV () |
| Create a vertical scrollbar. More... | |
| void | createH () |
| Create a horizontal scrollbar. More... | |
Private Attributes | |
| Type | _type |
| float | _x |
| float | _y |
| float | _z |
| float | _length |
| std::vector< Quad > | _quads |
| Graphics::Aurora::TextureHandle | _texture |
Additional Inherited Members | |
Protected Member Functions inherited from Graphics::Renderable | |
| void | resort () |
| void | lockFrame () |
| void | unlockFrame () |
| void | lockFrameIfVisible () |
| void | unlockFrameIfVisible () |
Protected Member Functions inherited from Graphics::Queueable | |
| bool | isInQueue (QueueType queue) const |
| void | addToQueue (QueueType queue) |
| void | removeFromQueue (QueueType queue) |
| void | lockQueue (QueueType queue) |
| void | unlockQueue (QueueType queue) |
| void | sortQueue (QueueType queue) |
Protected Attributes inherited from Graphics::Renderable | |
| QueueType | _queueExists |
| QueueType | _queueVisible |
| uint32 | _id |
| bool | _clickable |
| Common::UString | _tag |
| double | _distance |
| The distance of the object from the viewer. More... | |
A NWN scrollbar model.
Definition at line 43 of file scrollbar.h.
| Enumerator | |
|---|---|
| kTypeVertical | Vertical scrollbar. |
| kTypeHorizontal | Horizontal scrollbar. |
Definition at line 45 of file scrollbar.h.
| Engines::NWN::Scrollbar::Scrollbar | ( | Type | type | ) |
Definition at line 38 of file scrollbar.cpp.
References _texture, setLength(), and TextureMan.

| Engines::NWN::Scrollbar::~Scrollbar | ( | ) |
Definition at line 45 of file scrollbar.cpp.
References Graphics::Renderable::hide().

|
virtual |
Calculate the object's distance.
Implements Graphics::Renderable.
Definition at line 108 of file scrollbar.cpp.
References Graphics::Renderable::_distance, and _z.
Referenced by setPosition().

|
private |
Create a horizontal scrollbar.
Definition at line 131 of file scrollbar.cpp.
References _length, _quads, and MIN().
Referenced by setLength().


|
private |
Create a vertical scrollbar.
Definition at line 187 of file scrollbar.cpp.
References _length, _quads, and MIN().
Referenced by setLength().


| float Engines::NWN::Scrollbar::getHeight | ( | ) | const |
Get the scrollbar's height.
Definition at line 99 of file scrollbar.cpp.
References _length, _type, kTypeHorizontal, and kTypeVertical.
Referenced by Engines::NWN::WidgetScrollbar::getHeight(), and isIn().

| void Engines::NWN::Scrollbar::getPosition | ( | float & | x, |
| float & | y, | ||
| float & | z | ||
| ) | const |
Get the current position of the scrollbar.
Definition at line 61 of file scrollbar.cpp.
Referenced by Engines::NWN::WidgetScrollbar::getBarPosition().

| float Engines::NWN::Scrollbar::getWidth | ( | ) | const |
Get the scrollbar's width.
Definition at line 90 of file scrollbar.cpp.
References _length, _type, kTypeHorizontal, and kTypeVertical.
Referenced by Engines::NWN::WidgetScrollbar::getWidth(), and isIn().

|
virtual |
Is the point within the scrollbar?
Reimplemented from Graphics::Renderable.
Definition at line 67 of file scrollbar.cpp.
References _x, _y, getHeight(), and getWidth().

|
virtual |
Render the object.
Implements Graphics::Renderable.
Definition at line 112 of file scrollbar.cpp.
References _quads, _texture, _x, _y, _z, Graphics::kRenderPassTransparent, pass, and TextureMan.
| void Engines::NWN::Scrollbar::setLength | ( | float | length | ) |
Set the scrollbar length.
Definition at line 76 of file scrollbar.cpp.
References _length, _type, createH(), createV(), GfxMan, kTypeHorizontal, kTypeVertical, and MAX().
Referenced by Scrollbar(), and Engines::NWN::WidgetScrollbar::setLength().


| void Engines::NWN::Scrollbar::setPosition | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Set the current position of the scrollbar.
Definition at line 49 of file scrollbar.cpp.
References _x, _y, _z, calculateDistance(), and GfxMan.
Referenced by Engines::NWN::WidgetScrollbar::setState().


|
private |
Definition at line 84 of file scrollbar.h.
Referenced by createH(), createV(), getHeight(), getWidth(), and setLength().
|
private |
Definition at line 86 of file scrollbar.h.
|
private |
Definition at line 88 of file scrollbar.h.
Referenced by render(), and Scrollbar().
|
private |
Definition at line 78 of file scrollbar.h.
Referenced by getHeight(), getWidth(), and setLength().
|
private |
Definition at line 80 of file scrollbar.h.
Referenced by getPosition(), isIn(), render(), and setPosition().
|
private |
Definition at line 81 of file scrollbar.h.
Referenced by getPosition(), isIn(), render(), and setPosition().
|
private |
Definition at line 82 of file scrollbar.h.
Referenced by calculateDistance(), getPosition(), render(), and setPosition().
1.8.14