class View

A generic View class.

This native object is returned by Application::GetView() and Application::FindView() and provides methods to manipulate the view. The View class is only a generic wrapper for all C++ GUI objects and provides basic functionality.

Methods

Hide ()Hides the view.
MoveBy (const int, const int)Moves the view by the specified offsets.
MoveTo (const int, const int)Moves the view to the specified coordinates.
MoveToBack ()Moves the view to the bottom-most order in the z-hierarchy.
MoveToFront ()Moves the view to the top-most order in the z-hierarchy.
ResizeBy (const int, const int)Resizes the view by the specified offsets.
ResizeTo (const int, const int)Resizes the view to the specified width and height.
SetText (const string)Changes the text this view should display.
Show ()Shows the view.

Properties

int focus ()Returns the view's focus state.
int height ()Returns the height of the view's area.
int visible ()Returns the view's visibility.
int width ()Returns the width of the view's area.
int x ()Returns the x-coord of the view's area.
int y ()Returns the y-coord of the view's area.

Reference

method Hide ()

Hides the view.

If the view was visible, this will cause the view to become invisible, making it impossible to interact with it or it's children.


method MoveBy (const int dx, const int dy)

Moves the view by the specified offsets.


method MoveTo (const int x, const int y)

Moves the view to the specified coordinates.


method MoveToBack ()

Moves the view to the bottom-most order in the z-hierarchy.

The view will be drawn behind all it's siblings and all it's children.


method MoveToFront ()

Moves the view to the top-most order in the z-hierarchy.

The view will be drawn over all it's siblings, but under all it's children.


method ResizeBy (const int dw, const int dh)

Resizes the view by the specified offsets.


method ResizeTo (const int w, const int h)

Resizes the view to the specified width and height.


method SetText (const string text)

Changes the text this view should display.

Some views do not draw any text and therefore may ignore this call.


method Show ()

Shows the view.

If the view was hidden, this will cause the view to become visible on the screen.


accessor int focus ()

Returns the view's focus state.

A return value of true means the view currently has input focus, false means it does not.


accessor int height ()

Returns the height of the view's area.


accessor int visible ()

Returns the view's visibility.

A return value of true means the view is currently visible, false means it is hidden.


accessor int width ()

Returns the width of the view's area.


accessor int x ()

Returns the x-coord of the view's area.


accessor int y ()

Returns the y-coord of the view's area.