NovaTK Namespace Reference


Detailed Description

Contains all classes and public functions of the NovaTK API.


Classes

class  Clipboard
class  Dialog
class  FileSelectionDialog
class  FontSelectionDialog
class  MessageDialog
struct  EventInfo
struct  MouseEventInfo
struct  KeyboardEventInfo
class  Font
class  Graphics
class  Image
class  Rectangle
class  NString
class  Timer
class  TreeNode
class  Button
class  Checkbox
class  DropdownListbox
class  Editbox
class  Frame
class  ImageListbox
class  ImageView
class  Label
class  Listbox
class  Menu
class  Menubar
class  ProgressBar
class  RadioButton
class  RadioGroup
class  ScrollableImageView
class  Scrollbar
class  Section
class  Slider
class  TabBook
class  TableItem
class  TableStringItem
class  TableDropdownListItem
class  TableCheckboxItem
class  TableImageItem
class  Table
class  TableView
class  TextArea
class  TextEntry
class  Toolbar
class  TreeView
class  Viewer
class  Viewport
class  Widget
class  Window
class  ForeignWindow

Namespaces

namespace  Util

Enumerations

enum  WidgetEvent {
  EVENT_WIDGET_DRAW = 1, EVENT_WIDGET_HIDE = 2, EVENT_WIDGET_SHOW = 3, EVENT_WIDGET_FOCUS_RECEIVED = 4,
  EVENT_WIDGET_FOCUS_LOST = 5, EVENT_WIDGET_DESTROY = 6, EVENT_WIDGET_RESIZE = 7, EVENT_WIDGET_MOVE = 8,
  EVENT_WINDOW_MOUSE_ENTER = 9, EVENT_WINDOW_MOUSE_LEAVE = 10, EVENT_WINDOW_BUTTON_DOWN = 11, EVENT_WINDOW_BUTTON_UP = 12,
  EVENT_WINDOW_MOUSE_MOTION = 13, EVENT_WINDOW_KEY_DOWN = 14, EVENT_WINDOW_KEY_UP = 15, EVENT_WINDOW_CLOSE = 16,
  EVENT_VIEWPORT_POSITION_CHANGE = 17, EVENT_BUTTON_DOWN = 18, EVENT_BUTTON_UP = 19, EVENT_BUTTON_TOGGLE = 20,
  EVENT_SCROLLBAR_POSITION_CHANGE = 21, EVENT_TEXTENTRY_CHANGE = 22, EVENT_TEXTENTRY_ENTER = 23, EVENT_MENU_SELECT = 24,
  EVENT_MENUBAR_SELECT = 25, EVENT_TABBOOK_CHANGETAB = 26, EVENT_LISTBOX_SELECTION_CHANGE = 27, EVENT_LISTBOX_DOUBLE_CLICK = 28,
  EVENT_LISTBOX_DESELECTION = 45 , EVENT_IMAGELISTBOX_SELECTION_CHANGE = 30, EVENT_IMAGELISTBOX_DOUBLE_CLICK = 31 , EVENT_DROPDOWNLISTBOX_SELECTION_CHANGE = 33,
  EVENT_TREEVIEW_SELECTION_CHANGE = 34, EVENT_TREEVIEW_PRE_EXPAND = 35, EVENT_TREEVIEW_POST_EXPAND = 36, EVENT_TREEVIEW_COLLAPSE = 37,
  EVENT_TABLE_SELECTION_CHANGE = 38, EVENT_TABLE_DIMENSIONS_CHANGE = 39, EVENT_TABLE_ITEM_CHANGE = 40, EVENT_TABLE_ITEM_SELECT = 41,
  EVENT_TABLE_COLUMN_CHANGE = 48, EVENT_SECTION_COLLAPSE = 42, EVENT_SECTION_EXPAND = 43, EVENT_SECTION_PRE_EXPAND = 44,
  EVENT_RADIOBUTTON_SELECT = 46, EVENT_RADIOBUTTON_DESELECT = 47, EVENT_SLIDER_POSITION_CHANGE = 49
}
enum  NStatus {
  NOVATK_SUCCESS = 0, NOVATK_ERROR_BAD_POINTER = 1, NOVATK_ERROR_OUT_OF_BOUNDS = 2, NOVATK_ERROR_GENERAL_FAILURE = 3,
  NOVATK_ERROR_MEMALLOC_FAILURE = 4, NOVATK_ERROR_UNSUPPORTED = 5, NOVATK_ERROR_ALREADY_EXISTS = 6, NOVATK_ERROR_UNIMPLEMENTED = 7,
  NOVATK_ERROR_DOES_NOT_EXIST = 8, NOVATK_ERROR_BAD_REQUEST = 9, NOVATK_ERROR_NOTDIR = 10, NOVATK_ERROR_PERMISSION_DENIED = 11,
  NOVATK_ERROR_MAX_DESC = 12, NOVATK_ERROR_FTABLE_FULL = 13, NOVATK_ERROR_TOO_MANY_LINKS = 14, NOVATK_ERROR_NAME_TOO_LONG = 15
}

Functions

NStatus NovaTK_Init (int argc, char **argv)
void NovaTK_Main ()
void NovaTK_TerminateMain ()
void ProcessEvents ()
void NovaTK_Shutdown ()
WindowGetRootWindow ()
ulong Color (ushort red, ushort green, ushort blue)
const std::vector< NStringListCursorNames ()
const std::vector< NStringListFontFamilies ()
NStatus GetFontAttributes (const NString &family, byte &availableStyles, std::vector< uint > &availableSizes)
NOVATKAPI ClipboardGetClipboard ()
void MessageDlg (const NString &message, const NString &name="Message", Window *parent=NULL)
bool operator< (const NString &left, const NString &right)
bool operator<= (const NString &left, const NString &right)
bool operator> (const NString &left, const NString &right)
bool operator>= (const NString &left, const NString &right)


Enumeration Type Documentation

Contains common NovaTK return values used to identify if an operation succeeded or why it failed. The function descriptions themselves will usually give more detail on specifically what a certain NStatus means within the context of that function.

Enumerator:
NOVATK_SUCCESS  Operation succeeded.
NOVATK_ERROR_BAD_POINTER  A pointer passed to the function is invalid.
NOVATK_ERROR_OUT_OF_BOUNDS  The request does not refer to a valid portion of data.
NOVATK_ERROR_GENERAL_FAILURE  No other NStatus error matches the reason for failure.
NOVATK_ERROR_MEMALLOC_FAILURE  Memory required for the operation could not be allocated.
NOVATK_ERROR_UNSUPPORTED  This is operation is not supported by the current backend/platform/operating system.
NOVATK_ERROR_ALREADY_EXISTS  The item already exists.
NOVATK_ERROR_UNIMPLEMENTED  The function is not yet implemented in NovaTK or for this platform.
NOVATK_ERROR_DOES_NOT_EXIST  The requested item does not exist.
NOVATK_ERROR_BAD_REQUEST  The requested operation is not valid within that context.
NOVATK_ERROR_NOTDIR  A component of the path specified is not a directory.
NOVATK_ERROR_PERMISSION_DENIED  Permission is denied for this request.
NOVATK_ERROR_MAX_DESC  The maximum number of file descriptors are currently open.
NOVATK_ERROR_FTABLE_FULL  The system file table is full.
NOVATK_ERROR_TOO_MANY_LINKS  Too many symbolic links were encountered in translating a filename.
NOVATK_ERROR_NAME_TOO_LONG  A component of the filename is too long.

Identifies the event that has occurred.

Enumerator:
EVENT_WIDGET_DRAW  The widget is being redrawn.
EVENT_WIDGET_HIDE  The widget has been hidden/unmapped.
EVENT_WIDGET_SHOW  The widget has been shown/mapped when it was previously hidden.
EVENT_WIDGET_FOCUS_RECEIVED  The widget has received keyboard focus.
EVENT_WIDGET_FOCUS_LOST  The widget has lost keyboard focus.
EVENT_WIDGET_DESTROY  The widget is in the process of being destroyed.
EVENT_WIDGET_RESIZE  The widget's width and/or height has changed.
EVENT_WIDGET_MOVE  The position of the widget upon its parent has changed.
EVENT_WINDOW_MOUSE_ENTER  The pointer has entered the window. Delivers: MouseEventInfo
EVENT_WINDOW_MOUSE_LEAVE  The pointer has left the window. Delivers: MouseEventInfo
EVENT_WINDOW_BUTTON_DOWN  A mouse button has been pressed. Delivers: MouseEventInfo
EVENT_WINDOW_BUTTON_UP  A mouse button has been released. Delivers: MouseEventInfo
EVENT_WINDOW_MOUSE_MOTION  The pointer has moved within this window. Delivers: MouseEventInfo
EVENT_WINDOW_KEY_DOWN  A key has been pressed. Delivers: KeyboardEventInfo
EVENT_WINDOW_KEY_UP  A key has been released. Delivers: KeyboardEventInfo
EVENT_WINDOW_CLOSE  The user's window manager has requested that this window close. This is usually triggered by clicking the 'Close' button on the titlebar.
EVENT_VIEWPORT_POSITION_CHANGE  The position of the content in the viewport has changed.
EVENT_BUTTON_DOWN  The button has been pressed.
EVENT_BUTTON_UP  The button has been released.
EVENT_BUTTON_TOGGLE  The state of the toggle button has changed.
EVENT_SCROLLBAR_POSITION_CHANGE  The position of the scrollbar has changed.
EVENT_TEXTENTRY_CHANGE  The content of the TextEntry widget has changed.
EVENT_TEXTENTRY_ENTER  The user has pressed enter within a TextEntry widget.
EVENT_MENU_SELECT  A menu item has been selected.
EVENT_MENUBAR_SELECT  A menu has been opened.
EVENT_TABBOOK_CHANGETAB  The visible tab has changed.
EVENT_LISTBOX_SELECTION_CHANGE  A different item has been selected. Delivers: SelectionEventInfo
EVENT_LISTBOX_DOUBLE_CLICK  The user has double clicked an item.
EVENT_LISTBOX_DESELECTION  A previously selected item is no longer selected. The deselected items will be specified in SelectionEventInfo.
EVENT_IMAGELISTBOX_SELECTION_CHANGE  A different item has been selected.
EVENT_IMAGELISTBOX_DOUBLE_CLICK  The user has double clicked on an item.
EVENT_DROPDOWNLISTBOX_SELECTION_CHANGE  The selected item has changed.
EVENT_TREEVIEW_SELECTION_CHANGE  The selected item has changed.
EVENT_TREEVIEW_PRE_EXPAND  The user has expanded an item but its children have not yet been shown. This event can be used to replace a dummy item with the correct child items on demand.
EVENT_TREEVIEW_POST_EXPAND  The item has finished expanding and all children are displayed.
EVENT_TREEVIEW_COLLAPSE  The item is being collapsed and its children are being hidden.
EVENT_TABLE_SELECTION_CHANGE  An item or items have been selected or deselected.
EVENT_TABLE_DIMENSIONS_CHANGE  The total dimensions occupied by the table have changed either through a change in number of rows or columns or in the width of columns.
EVENT_TABLE_ITEM_CHANGE  The contents of the item have changed. (For exampe a StringItem has been edited.)
EVENT_TABLE_ITEM_SELECT  This item has been selected.
EVENT_TABLE_COLUMN_CHANGE  The width of a column has changed.
EVENT_SECTION_COLLAPSE  The contents of the section have been hidden.
EVENT_SECTION_EXPAND  The contents of the section have been shown.
EVENT_SECTION_PRE_EXPAND  The contents of the section are about to be shown.
EVENT_RADIOBUTTON_SELECT  The radiobutton has been selected.
EVENT_RADIOBUTTON_DESELECT  The radiobutton was previously selected but no longer is.
EVENT_SLIDER_POSITION_CHANGE  The user has changed the position of the slider.


Function Documentation

NOVATKAPI ulong NovaTK::Color ( ushort  red,
ushort  green,
ushort  blue 
)

Requests a color by its red, green and blue components. The range of each parameter is 0 to 255.

Returns:
A unique ID that identifies the requested color within NovaTK.

NOVATKAPI Clipboard& NovaTK::GetClipboard (  )  [inline]

Returns:
A reference to the clipboard. There can only be one instance of Clipboard which is created and destroyed by NovaTK.

NOVATKAPI NStatus NovaTK::GetFontAttributes ( const NString &  family,
byte &  availableStyles,
std::vector< uint > &  availableSizes 
)

Obtains the available attributes of specific font family.

Parameters:
family - Specifies the font family being queried.
availableStyles - This will contain a bitmask specifying what styles are availabe for this font family. See Font::Style.
availableSizes - The vector specified here will be filled with the point sizes available for this font family.
Returns:
NOVATK_SUCCESS upon success, otherwise returns an error. The most common reason for this function to fail is that the font family could not be found.

NOVATKAPI Window & NovaTK::GetRootWindow (  ) 

Returns:
A reference to the root window. The root window is the parent of all top-level windows and the ancestor of ALL windows. It is normally the window that represents the user's desktop.
Note:
Because the root window is created by the user's platform and not be NovaTK, the Window returned is a foreign window not a native window and thus the operations that can be performed upon it are limited. (For example, you may not destroy foreign windows)

NOVATKAPI const std::vector< NString > NovaTK::ListCursorNames (  ) 

Returns:
A vector of NStrings containing the names of all cursors that are currently known to NovaTK.

NOVATKAPI const std::vector< NString > NovaTK::ListFontFamilies (  ) 

Returns:
A vector of NStrings containing the names of all font families available on the user's system.

void NovaTK::MessageDlg ( const NString &  message,
const NString &  name = "Message",
Window *  parent = NULL 
) [inline]

This is a helper function that instantiates a MessageDialog and displays it using the given parameters.

See also:
MessageDialog

NOVATKAPI NStatus NovaTK::NovaTK_Init ( int  argc = 0,
char **  argv = 0 
)

Initializes NovaTK and prepares it for use. This function MUST be called before ANY other functions in the library!

NOVATKAPI void NovaTK::NovaTK_Main (  ) 

Calls the the main loop of NovaTK. This should be called after your application has completed initialization. Control will then be transferred to NovaTK and only returned when events occur and callbacks are executed. If you need control of your program's main loop at all times then see ProcessEvents.

See also:
ProcessEvents

NOVATKAPI void NovaTK::NovaTK_Shutdown (  ) 

Performs clean up of NovaTK. This should usually be called before your program exists. You should ALWAYS destroy any NovaTK objects you have created yourself before calling NovaTK_Shutdown, do not expect NovaTK_Shutdown to do it for you.

NOVATKAPI void NovaTK::NovaTK_TerminateMain (  ) 

Causes NovaTK_Main() to return. Note that NovaTK keeps track of how many times you call NovaTK_Main. This function will only cause the last call to NovaTK_Main to return. Thus if you called NovaTK_Main within a callback then it will return there but the original call to NovaTK_Main will not unless you call this funciton again.

bool NovaTK::operator< ( const NString &  left,
const NString &  right 
) [inline]

Returns:
TRUE if left is goes alphabetically before right.

bool NovaTK::operator<= ( const NString &  left,
const NString &  right 
) [inline]

Returns:
TRUE if left is goes alphabetically before right or if the two strings are identical.

bool NovaTK::operator> ( const NString &  left,
const NString &  right 
) [inline]

Returns:
TRUE if left is goes alphabetically after right.

bool NovaTK::operator>= ( const NString &  left,
const NString &  right 
) [inline]

Returns:
TRUE if left is goes alphabetically after right or if the two strings are identical.

NOVATKAPI void NovaTK::ProcessEvents (  ) 

Normally, all applications call NovaTK_Main which automatically calls this function as part of its main loop. However, some applications may need to always have control of their main loop. For such circumstances, ProcessEvents is provided. ProcessEvents should be called as part of your main loop. If there are any events that need to be processed then ProcessEvents will not return until all events have been handled by their allocated callbacks. Note that ProcessEvents doesn't monitor watched descriptors.


Generated on Sat Sep 13 22:34:18 2008 for NovaTK by  doxygen 1.5.5