#include <gfx_gui.hh>

Public Member Functions | |
| GuiBase (void) | |
| virtual | ~GuiBase () |
| virtual void | Draw (void) |
| GuiScreen * | NewScreen (void) |
| void | DeleteScreen (GuiScreen *screen) |
| void | ReshapeViewport (const Rect< int > &viewport, const Rect< int > &window) |
| void | SetZoom (const fp zoom) |
| fp | GetZoom (void) |
| fp | GetZoomViewport (void) |
| uint | GetReshapeCnt (void) |
| bool | IfBlend (void) |
| void | ToggleBlend (void) |
| RGBA | GetColorBg (void) |
| void | AppTimerOneSecond (void) |
| Your application must call this every second. | |
| void | AppMouseMotionHandler (fp x, fp y) |
| Your application must pass mouse events to this. | |
| void | AppMouseButtonHandler (eMouseEvent button, bool down) |
| Your application must pass mouse events to this. | |
| bool | GetMousePos (Vector2 &pos) |
| returns false if mouse outside viewport | |
| void | SetMousePos (const Vector2 &pos) |
| virtual Vector2 | MousePos2ViewportPos (const Vector2 &mousePos)=0 |
| uint | GetMouseButtons (void) |
| void | SetMouseButtons (uint buttons) |
| SafePtr< Font > | GetButtonFont (void) |
| font wrappers for related Gui* classes | |
Public Attributes | |
| Rect< int > | mViewport |
| Rect< int > | mViewportInitial |
| Rect< int > | mWindow |
Protected Attributes | |
| bool | mBlend |
| whether to blend widgets with background | |
| RGBA | mColorBg |
| background if not blend | |
| fp | mZoom |
| zoom is a base scale | |
| fp | mZoomViewport |
| zoomViewport is an additional scale for viewport | |
| fp | mViewportDelta [2] |
| [x,y] compensates for viewport's offsets to window | |
| uint | mReshapeCnt |
| Dlist< GuiScreen > | mScreenDlist |
| Vector2 | mMousePos |
| position of mouse cursor | |
| uint | mMouseButtons |
| a bit for each button | |
| Font * | mLfontText |
| Font * | mLfontTextThin |
| Font * | mLfontButton |
Private Member Functions | |
| void | MouseHandler (bool motionEvent) |
| SafePtr< Font > | GetFont (eScreenFontType type) |
Friends | |
| class | GuiScreen |
| class | GuiObject |
| class | GuiPrint |
| gfx::GuiBase::GuiBase | ( | void | ) |
Constructor.
| gfx::GuiBase::~GuiBase | ( | ) | [virtual] |
| void gfx::GuiBase::Draw | ( | void | ) | [virtual] |
Draw all screens.
Reimplemented in gfx::Gui.
| GuiScreen * gfx::GuiBase::NewScreen | ( | void | ) |
Return a new "screen". A screen is a set of GUI objects.
| void gfx::GuiBase::DeleteScreen | ( | GuiScreen * | screen | ) |
Viewport and reshape. The user must call ReshapeView() whenever the viewport is reshaped so that the GUI object can adjust accordingly.
| void gfx::GuiBase::SetZoom | ( | const fp | zoom | ) |
Set zoom.
| fp gfx::GuiBase::GetZoom | ( | void | ) | [inline] |
| fp gfx::GuiBase::GetZoomViewport | ( | void | ) | [inline] |
| uint gfx::GuiBase::GetReshapeCnt | ( | void | ) | [inline] |
| bool gfx::GuiBase::IfBlend | ( | void | ) | [inline] |
| void gfx::GuiBase::ToggleBlend | ( | void | ) | [inline] |
| RGBA gfx::GuiBase::GetColorBg | ( | void | ) | [inline] |
| void gfx::GuiBase::AppTimerOneSecond | ( | void | ) |
Your application must call this every second.
Timer callback invoked every second.
Your application must pass mouse events to this.
Client is supposed to pass mouse events to this.
| x,y | Mouse position. |
| void gfx::GuiBase::AppMouseButtonHandler | ( | eMouseEvent | button, | |
| bool | down | |||
| ) |
Your application must pass mouse events to this.
Your application is supposed to pass mouse events to this. This is for a single button event.
| button | Which button (singular): eMouseEvent_BUTTON_[123] | |
| down | True if button clicked, false if released. |
| bool gfx::GuiBase::GetMousePos | ( | Vector2 & | pos | ) |
returns false if mouse outside viewport
| void gfx::GuiBase::SetMousePos | ( | const Vector2 & | pos | ) |
Mouse was moved.
Implemented in gfx::Gui.
| uint gfx::GuiBase::GetMouseButtons | ( | void | ) |
Get/set mouse button bit fields. Use a combination of eMouseEvent_BUTTON_*.
| void gfx::GuiBase::SetMouseButtons | ( | uint | buttons | ) |
| void gfx::GuiBase::MouseHandler | ( | bool | motionEvent | ) | [private] |
Mouse handler.
| SafePtr< Font > gfx::GuiBase::GetFont | ( | eScreenFontType | type | ) | [private] |
Common helper to get appropriate Font object.
friend class GuiScreen [friend] |
friend class GuiObject [friend] |
friend class GuiPrint [friend] |
bool gfx::GuiBase::mBlend [protected] |
whether to blend widgets with background
RGBA gfx::GuiBase::mColorBg [protected] |
background if not blend
fp gfx::GuiBase::mZoom [protected] |
zoom is a base scale
fp gfx::GuiBase::mZoomViewport [protected] |
zoomViewport is an additional scale for viewport
fp gfx::GuiBase::mViewportDelta[2] [protected] |
[x,y] compensates for viewport's offsets to window
uint gfx::GuiBase::mReshapeCnt [protected] |
Dlist<GuiScreen> gfx::GuiBase::mScreenDlist [protected] |
Vector2 gfx::GuiBase::mMousePos [protected] |
position of mouse cursor
uint gfx::GuiBase::mMouseButtons [protected] |
a bit for each button
Font* gfx::GuiBase::mLfontText [protected] |
Font* gfx::GuiBase::mLfontTextThin [protected] |
Font* gfx::GuiBase::mLfontButton [protected] |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:26 2007