tbx  0.7.6
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
tbx Namespace Reference

A library for creating RISC OS toolbox applications. More...

Namespaces

 doc
 Helper classes to create a document based application.
 
 ext
 Classes to access third-party extensions to RISC OS.
 
 fpcs
 fpcs namespace is used to provide control strings for font painting
 
 res
 Classes to use/edit toolbox resources in memory.
 
 view
 Helper classes to display and edit data.
 

Classes

class  AboutToBeShownEvent
 Event information for AboutToBeShown event. More...
 
class  AboutToBeShownListener
 Listener for about to be shown event. More...
 
class  ActionButton
 ActionButton wrapper for an underlying toolbox ActionButton gadget. More...
 
class  Adjuster
 An Adjuster is a gadget that shows two arrows facing in opposite directions either vertically or horizontally. More...
 
class  AdjusterClickedEvent
 Event information for Adjuster Clicked event. More...
 
class  AdjusterClickedListener
 Listener for Adjuster Clicked events. More...
 
class  Application
 The main application class. More...
 
class  AutoCreateClass
 Templated auto create listener to create a C++ object when a toolbox object gets auto created. More...
 
class  AutoCreateClassOnce
 Templated auto create listener to create a C++ object when a toolbox object gets auto created. More...
 
class  AutoCreateListener
 Base Listener for auto create events. More...
 
class  BBox
 Class to represent a two dimensional bounding box. More...
 
class  Button
 A Button is a gadget that show a sprite or some text in the window. More...
 
class  ButtonSelectedEvent
 Button has been selected event. More...
 
class  ButtonSelectedListener
 Listener for button selected events. More...
 
class  Caret
 
class  CaretEvent
 Event data for lose or gain caret listener. More...
 
class  Clipboard
 Class to handler the global RISC OS clipboard. More...
 
class  ClipboardBytes
 Convenience class to create clipboard data for an array of bytes. More...
 
class  ClipboardClaimedListener
 Listener for clipboard related events. More...
 
class  ClipboardData
 Base class for data used on the clipboard. More...
 
class  ClipboardFormatListener
 Listener for the response to check_format(s) More...
 
class  ClipboardText
 Convenience class to create clipboard data containing a string. More...
 
class  CloseWindowListener
 Listener for the close window request message. More...
 
class  Colour
 Class to represent a RGB colour. More...
 
class  ColourDbox
 Class to show a toolbox ColourDbox object which allows a user to pick a colour using a variety of colour models. More...
 
class  ColourDboxDialogueCompletedListener
 Listener for when the Colour dialogue box has been closed. More...
 
class  ColourMenu
 Class to show a toolbox ColourMenu object. More...
 
class  ColourMenuSelectionListener
 Listener for when an item is selected from the colour menu. More...
 
class  ColourPalette
 A class to hold a list of Colours for the a colour palette. More...
 
class  ColourSelectedEvent
 Event data for colour selected event. More...
 
class  ColourSelectedListener
 Event listener for colour selected event. More...
 
class  Command
 Base class for commands in tbx. More...
 
class  CommandMethod
 Template to create a command that calls a member function. More...
 
class  Component
 Base class for components in an object. More...
 
class  ComponentNullError
 Exception thrown when a C++ object representing a toolbox gadget uses a method that requires a non-null gadget id. More...
 
class  DataReceivedEvent
 Class with details of buffer transferred from another application. More...
 
class  DCS
 Class to show a toolbox DCS object that gives the user an option to Discard, Cancel or Save a file. More...
 
class  DCSCancelListener
 Listener for when a cancel is selected from the DCS dialog. More...
 
class  DCSDiscardListener
 Listener for when a discard is selected from the DCS dialog. More...
 
class  DCSSaveListener
 Listener for when a save is selected from the DCS dialog. More...
 
class  DeleteClassAndObjectOnHidden
 Templated object has been hidden listener to delete a C++ object and the toolbox object that generated the event when a toolbox object gets hidden. More...
 
class  DeleteClassOnHidden
 Templated object has been hidden listener to delete a C++ object when a toolbox object gets hidden. More...
 
class  DeleteObjectOnHidden
 Class to delete a toolbox object when it has been hidden. More...
 
class  DisplayField
 DisplayField wrapper for an underlying toolbox DisplayField gadget. More...
 
class  DragEndedEvent
 Event information for Drag ended event. More...
 
class  DragEndedListener
 Listener for DragStarted events. More...
 
class  Draggable
 A Draggable is a gadget that shows. More...
 
class  DragHandler
 Class to report status of a drag started on a window. More...
 
class  DragStartedEvent
 Event information for Drag started event. More...
 
class  DragStartedListener
 Listener for DragStarted events. More...
 
class  DrawCapAndJoin
 Class to set the cap and joins style for lines that are greater than a single pixel wide. More...
 
class  DrawDashPattern
 Class to represent a dash pattern for lines. More...
 
class  DrawElement
 Base class for elements added to a draw path. More...
 
class  DrawElementBezier
 Bezier curve to element. More...
 
class  DrawElementCloseGap
 Close path with a gap element. More...
 
class  DrawElementCloseLine
 Close path with a line element. More...
 
class  DrawElementContinuation
 Pointer to continuation of path. More...
 
class  DrawElementEnd
 End of path. More...
 
class  DrawElementGap
 Gap to (x, y) Element. More...
 
class  DrawElementLine
 Line to (x, y) Element. More...
 
class  DrawElementMove
 Move to (x, y) starting new subpath. More...
 
class  DrawElementMoveInternal
 Move to (x, y) starting new subpath. More...
 
class  DrawFile
 Class to render a draw file to the screen. More...
 
class  DrawPath
 Class to represent, display and manipulate a graphical path used by the Draw RISC OS module. More...
 
class  DrawTransform
 Class to represent Drawing transforms. More...
 
class  EventInfo
 Class to provide information on a toolbox event. More...
 
class  FileInfo
 Class to show a toolbox FileInfo object. More...
 
class  FilerAction
 Class to use the RISC OS desktop filer to perform multi-tasking file operations. More...
 
class  FilerActionFinishedListener
 Listener for filer action finished. More...
 
class  Fixed16
 Class to represent a fixed point number with 16bits before and after the point. More...
 
class  Font
 Class to handle painting and measuring text using an outline font. More...
 
class  FontDbox
 Class to show a toolbox FontDbox object. More...
 
class  FontDboxApplyEvent
 Event information for FontDboxApplyListener. More...
 
class  FontDboxApplyListener
 Listener for FontDbox Apply events. More...
 
struct  FontDetails
 Structure used to return details of a font. More...
 
class  FontMenu
 Class to show a toolbox FontMenu object. More...
 
class  FontMenuSelectionEvent
 Class to return information on font menu selection event. More...
 
class  FontMenuSelectionListener
 Listener for font menu selection events. More...
 
struct  FullFontDetails
 Structure used to return full details of the font which also includes the font identifier. More...
 
class  Gadget
 This is the base class for all Gadgets. More...
 
class  GadgetClassError
 Exception thrown when an underlying toolbox gadget id doesn't match the C++ class used to represent the toolbox gadget. More...
 
class  GainCaretListener
 Listener for gain caret Wimp event. More...
 
class  Graphics
 Interface to drawing graphics to the screen. More...
 
class  HasBeenHiddenListener
 Listener for an object has been hidden event. More...
 
class  Hourglass
 Display the RISC OS hour glass. More...
 
class  Iconbar
 Class to represent toolbox iconbar icon. More...
 
class  IconbarClickEvent
 Iconbar as been clicked event details. More...
 
class  IconbarClickListener
 Listener for button selected events. More...
 
class  IconPainter
 Class to draw an icon in a redraw listener. More...
 
class  IdBlock
 Information passed back by the Toolbox with each toolbox event providing information on where the event occurred. More...
 
class  Image
 Base class image classes providing a consistent interface to plot the to the screen. More...
 
class  JPEG
 Class to load and display JPEG images. More...
 
class  KeyEvent
 Event data for lose or gain caret listener. More...
 
class  KeyListener
 Listener for KeyPressed WIMP event. More...
 
class  Listener
 Base class for all toolbox event listeners. More...
 
class  Loader
 Class to handle file/data loading from the filer or an external application. More...
 
class  LoadEvent
 Class with details of a file load operation. More...
 
class  LockExtentPosition
 Class to lock the position of gadgets relative to the work area of the window they are in. More...
 
class  LoseCaretListener
 Listener for LoseCaret Wimp event. More...
 
class  Margin
 Class to represent a margin around an area. More...
 
class  MatchLifetime
 Templated class to match the lifetime of a toolbox object to a c++ class. More...
 
class  MemoryLoader
 Helper class to implement the loader interface and call a routine once all the bytes have been loaded with the bytes loaded at the end of the processing. More...
 
class  Menu
 Class representing a toolbox menu. More...
 
class  MenuItem
 Class representing a single menu item on a menu. More...
 
class  MenuSelectionListener
 Listener for selection of menu items that do not have another event associated with them. More...
 
class  MessageFile
 Class to lookup token translations from a messages file. More...
 
class  MessageWindow
 Class to show a message in a window in the centre of the screen, resizing the window to fit the message if necessary. More...
 
class  ModeChangedListener
 Class to simplify handling of Quit WIMP message. More...
 
class  ModeInfo
 Class to return information on a screen mode. More...
 
class  MouseClickEvent
 Event for click on a window. More...
 
class  MouseClickListener
 Listener for mouse clicks on a Window. More...
 
class  NumberRange
 NumberRange wrapper for an underlying toolbox NumberRange gadget. More...
 
class  Object
 Class to manipulate a toolbox object. More...
 
class  ObjectClassError
 Exception thrown when the underlying toolbox object class doesn't match the C++ class used to represent the toolbox object. More...
 
class  ObjectDeleteClass
 Templated object deleted listener to delete a C++ object when a toolbox object gets deleted. More...
 
class  ObjectDeletedListener
 Listener for toolbox object deleted event. More...
 
class  ObjectNullError
 Exception thrown when a C++ object representing a toolbox object uses a method that requires a non-null toolbox handle. More...
 
class  OffsetGraphics
 Class to draw to graphics to the screen using standard OS routines off setting the coordinates given. More...
 
class  OpenerManager
 Internal class to help implement data openers. More...
 
class  OpenWindowEvent
 Event data for open window request listener. More...
 
class  OpenWindowListener
 Listener for Wimp Open Window Request events. More...
 
class  OptionButton
 OptionButton wrapper for an underlying toolbox OptionButton gadget. More...
 
class  OptionButtonStateEvent
 Event for Option button state changed. More...
 
class  OptionButtonStateListener
 Listener for changes to the state of an option button. More...
 
class  OsError
 Class representing an error generated by a call to a RISC OS routine (SWI). More...
 
class  OSGraphics
 Class to draw to graphics to the screen using standard OS routines with no translation or scaling. More...
 
class  PaletteChangedListener
 Class to simplify handling of Quit WIMP message. More...
 
class  Path
 Class to manipulate RISC OS file and directory path names. More...
 
class  PathInfo
 Class to hold the catalogue information for a file. More...
 
class  Point
 Class to represent a position in two dimensional space. More...
 
class  PointerEnteringListener
 Listener for the pointer entering the window. More...
 
class  PointerInfo
 Class to store and fetch information about the WIMP mouse pointer. More...
 
class  PointerLeavingListener
 Listener for the pointer leaving the window. More...
 
struct  PollBlock
 Structure holding the raw data from a call to Wimp_Poll. More...
 
class  PopUp
 A PopUp is a gadget that shows a menu arrow icon that shows an associated menu when clicked. More...
 
class  PopUpAboutToBeShownEvent
 Event information for PopUp AboutToBeShown event. More...
 
class  PopUpAboutToBeShownListener
 Listener for PopUp AboutToBeShown events. More...
 
class  PostEventListener
 Class to provide a listener to allow processing before the call to wimp poll. More...
 
class  PostPollListener
 Class to provide a listener to allow inspection of the values returned from the Wimp_Poll call. More...
 
class  PrePollListener
 Class to provide a listener to allow processing before the call to wimp poll. More...
 
class  PreQuitEvent
 Event passed to pre quit listeners. More...
 
class  PreQuitListener
 Listen for the pre quit message from the desktop. More...
 
class  PrintDbox
 Class to show a toolbox PrintDbox object. More...
 
class  PrintDboxPrintEvent
 Print button has been pressed event. More...
 
class  PrintDboxPrintListener
 Listener for Print selected on PrintDbox. More...
 
class  PrintDboxSaveListener
 Listener for Save selected on PrintDbox. More...
 
class  PrintDboxSetupAboutToBeShownEvent
 The dialog box associated with the setup button is about to be shown event. More...
 
class  PrintDboxSetupAboutToBeShownListener
 Setup dialog is about to be shown listener. More...
 
class  PrintDboxSetupListener
 Listener for Setup presses when there is not dialogue associated with the button. More...
 
class  ProgInfo
 Class to show a toolbox ProgInfo object. More...
 
class  PropertySet
 Maintain a simple set of string properties with their values. More...
 
class  PThreadGuard
 Helper class to stop pthreads from executing during event processing which is unsafe. More...
 
class  QuestionWindow
 Class to show a question in a window in the centre of the screen, resizing the window to fit the question if necessary. More...
 
class  Quit
 Class to show a toolbox Quit object that gives the user an option to Quit or Cancel the application. More...
 
class  QuitCancelListener
 Listener for when a cancel is selected from the Quit dialog. More...
 
class  QuitListener
 Class to simplify handling of Quit WIMP message. More...
 
class  QuitQuitListener
 Listener for when a Quit is selected from the Quit dialog. More...
 
class  QuitRestarter
 Class to allow a quit cancelled during the prequit message to be restarted. More...
 
class  RadioButton
 A RadioButton is a gadget that is shown with other RadioButtons to allow the choice of one item of a group of options. More...
 
class  RadioButtonStateChangedEvent
 Event information for RadioStateButton event that is generated when a radio buttons state changes. More...
 
class  RadioButtonStateChangedListener
 Listener for RadioButton state changed event. More...
 
class  RedrawEvent
 Event passed to redraw listener to give details on the area that needs a redraw. More...
 
class  RedrawListener
 Redraw event listener. More...
 
class  ResMenuItemError
 Exception thrown is a component id does not refer to an item in a menu resource. More...
 
class  SafeList
 Simple one way linked list of pointers that provides a single iterator that can be used safely if items are removed or the class containing the list is deleted. More...
 
class  SaveAs
 Class to show the RISC OS SaveAs dialog box and generate events to allow the application to do the Save. More...
 
class  SaveAsDialogueCompletedEvent
 Event information for when saveas dialogue has been completed. More...
 
class  SaveAsDialogueCompletedListener
 Listener for when the save as dialogue box has been closed. More...
 
class  SaveAsFillBufferHandler
 Handler for SaveAsFillBuffer message. More...
 
class  SaveAsSaveCompletedEvent
 Event for SaveAsSaveCompletedListener. More...
 
class  SaveAsSaveCompletedListener
 Listener for when a save has been completed. More...
 
class  SaveAsSaveToFileHandler
 Handler for SaveAsSaveToFile message. More...
 
class  Saver
 Class to give the same interface to saving to an external application as the SaveAs dialogue. More...
 
class  SaverFillBufferHandler
 Handler for SaverFillBuffer handler. More...
 
class  SaverFinishedEvent
 Event information for when saver dialogue has been completed. More...
 
class  SaverFinishedHandler
 Listener for when the save as dialogue box has been closed. More...
 
class  SaverSaveCompletedEvent
 Event for SaverSaveCompletedHandler. More...
 
class  SaverSaveCompletedHandler
 Listener for when a save has been completed. More...
 
class  SaverSaveToFileHandler
 Handler to save data to a file. More...
 
class  Scale
 Class to show a toolbox Scale object. More...
 
class  ScaleApplyFactorEvent
 Class to provide apply factor event information for Scale object. More...
 
class  ScaleApplyFactorListener
 Listener for scale factor events. More...
 
class  ScaleFactors
 Class for sprite ScaleFactors. More...
 
class  ScrollList
 Scrolling list of items with an optional sprite. More...
 
class  ScrollListSelectionEvent
 Item has been selected event. More...
 
class  ScrollListSelectionListener
 Listener for selections on a scroll list. More...
 
class  ScrollRequestEvent
 Information for ScrollRequest listener. More...
 
class  ScrollRequestListener
 Scroll request listener. More...
 
class  ShowFullObject
 Objects derived from this class can be shown with there full location and size specified as well as the top left or default. More...
 
struct  ShowFullSpec
 Structure used to specify exact position and size for an object derived from tbx::ShowFullObject. More...
 
class  ShowHelp
 Command to show the application help file. More...
 
class  ShowPointObject
 Object that can be shown at a specific position as well as its default place. More...
 
struct  ShowSubWindowSpec
 Structure used to show a window as a subwindow. More...
 
class  Size
 Class to represent a two-dimensional size. More...
 
class  Slider
 A Slider is a gadget that shows bar in a well which may be draggable by the user. More...
 
class  SliderValueChangedEvent
 Information on event generated when the value of the slider has been changed. More...
 
class  SliderValueChangedListener
 Listener for changes in the slider value. More...
 
class  Sprite
 Common base class for the UserSprite and WimpSprite classes. More...
 
class  SpriteArea
 A SpriteArea holds zero or more user sprites. More...
 
class  SpriteCapture
 Class to capture screen output to a sprite. More...
 
class  SpriteException
 Exception thrown for sprite method failures. More...
 
class  StringSet
 StringSet wrapper class for an underlying toolbox StringSet gadget. More...
 
class  StringSetAboutToBeShownListener
 Listener for the string set about to be shown event. More...
 
class  StringSetTextChangedEvent
 StringSet text change event. More...
 
class  SubMenuEvent
 Event details for submenu event. More...
 
class  SubMenuListener
 Listener for event when mouse moves over the submenu arrow if no other toolbox event has been associated with it. More...
 
class  Tag
 Class to represent a some data tagged with an id. More...
 
class  TagAttribute
 Class to represent a single attribute. More...
 
class  TagData
 Base class used for adding data to a tag. More...
 
class  TagDoc
 Document that stores Tags with optional attributes in a hierarchy. More...
 
class  TagException
 Exception thrown when reading a saved tag fails. More...
 
struct  TaskInfo
 Structure containing information on a task. More...
 
class  TaskManager
 Class to find and enumerate running tasks. More...
 
class  TaskWindow
 Class to start a child task in a RISC OS task window. More...
 
class  TaskWindowFinishedListener
 Listener for when a task window has finished. More...
 
class  TaskWindowOutputListener
 Listener for output from a task window. More...
 
class  TaskWindowStartedListener
 Listener for when a task window has started. More...
 
class  TextArea
 Class to manipulate a toolbox TextArea gadget. More...
 
class  TextChangedEvent
 Event details for a change of text in a gadget. More...
 
class  TextChangedListener
 Listener for text changed events. More...
 
class  TextDisplayWindow
 Class to show some text in a window in the centre of the screen, with an icon to the left and one or buttons at the bottom. More...
 
class  Timer
 Callback class for a timer. More...
 
class  ToolAction
 A ToolAction is a gadget that shows a button that changes it's sprite or text depending on if it is on/off or faded. More...
 
class  ToolActionSelectedEvent
 Event information for ToolAction Selected events. More...
 
class  ToolActionSelectedListener
 Listener for ToolAction Selected events. More...
 
class  TranslationTable
 Class for a sprite colour translation table. More...
 
class  UncaughtHandler
 Interface to process uncaught exceptions in an application. More...
 
class  URI
 Class to take a URI and dispatch it to the Wimp for processing. More...
 
class  URIResultHandler
 Handler to check if a URI was successfully launched. More...
 
class  UserEvent
 UserEvent class holds details for a UserEventListener. More...
 
class  UserEventListener
 A UserEventListener can be used to capture any event on an object or component. More...
 
class  UserSprite
 Sprite from a user sprite area. More...
 
class  UTCTime
 Class to handle the 5 byte times. More...
 
class  ValueChangedEvent
 Event details for a change of an integer value in a gadget. More...
 
class  ValueChangedListener
 Listener for value changed events. More...
 
class  VisibleArea
 Class to store information for the Visible area of a window and provide work area to screen conversion. More...
 
class  WimpAcknowledgeMessageListener
 Listener to handle WimpAcnowledgeMessages (event code 19) More...
 
class  WimpColour
 Class to represent a standard desktop WIMP colour. More...
 
class  WimpFont
 Class to display and measure text using the current desktop font. More...
 
class  WimpMessage
 Wimp message information. More...
 
class  WimpMessageEvent
 Wimp message received event. More...
 
class  WimpMessageListener
 Base for listener for wimp messages. More...
 
class  WimpRecordedMessageListener
 Listener to handle WimpRecordedMessages (event code 18) More...
 
class  WimpSprite
 Class for handling sprites from the Wimp sprite pool. More...
 
class  WimpUserMessageListener
 Listener to handle WimpUserMessages (event code 17) More...
 
class  Window
 The Window object represents a toolbox window. More...
 
class  WindowInfo
 Window Information structure for the Window get_info method. More...
 
class  WindowOpenInfo
 Class with details of window location on screen. More...
 
class  WindowState
 Window state structure for the Window get_state method. More...
 
class  WritableField
 WritableField wrapper class for an underlying toolbox WritableField gadget. More...
 
class  WritableFieldTextChangedEvent
 Writable field text change event. More...
 

Typedefs

typedef unsigned int ObjectId
 Type for underlying toolbox object id.
 
typedef int ComponentId
 Type for underlying toolbox component id.
 
typedef int WindowHandle
 Type for WIMP windows handle.
 
typedef int IconHandle
 Type for WIMP icon handle.
 
typedef void * ResHandle
 Type for Resource handle return from the toolbox.
 
typedef int TaskHandle
 Type for a Wimp Task.
 
typedef void(* RawToolboxEventHandler) (IdBlock &id_block, PollBlock &data, Listener *listener)
 Function type for handlers of raw (unprocessed) Toolbox events.
 
typedef PrintDboxPrintEvent PrintDboxSaveEvent
 Event information for the save listener.
 
typedef int * OsSpriteAreaPtr
 Type for pointer to underlying RISC OS Sprite area.
 
typedef int * OsSpritePtr
 Type for pointer to underlyin RISC OS sprite.
 

Enumerations

enum  DrawFillStyle {
  WINDING_NON_ZERO, WINDING_NEGATIVE, WINDING_EVEN_ODD, WINDING_POSITIVE,
  PLOT_NON_BOUNDARY_EXTERIOR = 4, PLOT_BOUNDARY_EXTERIOR = 8, PLOT_BOUNDARY_INTERIOR = 16, PLOT_NON_BOUNDARY_INTERIOR = 32,
  PLOT_ALL_AT_ONCE = 0x80000000
}
 Enumeration to set the fill style when filling shapes. More...
 
enum  InternalKey {
  INTERNAL_KEY_PRINT = -33, INTERNAL_KEY_F1 = -114, INTERNAL_KEY_F2 = -115, INTERNAL_KEY_F3 = -116,
  INTERNAL_KEY_F4 = -21, INTERNAL_KEY_F5 = -117, INTERNAL_KEY_F6 = -118, INTERNAL_KEY_F7 = -23,
  INTERNAL_KEY_F8 = -119, INTERNAL_KEY_F9 = -120, INTERNAL_KEY_F10 = -31, INTERNAL_KEY_F11 = -29,
  INTERNAL_KEY_F12 = -30, INTERNAL_KEY_A = -66, INTERNAL_KEY_B = -101, INTERNAL_KEY_C = -83,
  INTERNAL_KEY_D = -51, INTERNAL_KEY_E = -35, INTERNAL_KEY_F = -68, INTERNAL_KEY_G = -84,
  INTERNAL_KEY_H = -85, INTERNAL_KEY_I = -38, INTERNAL_KEY_J = -70, INTERNAL_KEY_K = -71,
  INTERNAL_KEY_L = -87, INTERNAL_KEY_M = -102, INTERNAL_KEY_N = -86, INTERNAL_KEY_O = -55,
  INTERNAL_KEY_P = -56, INTERNAL_KEY_Q = -17, INTERNAL_KEY_R = -52, INTERNAL_KEY_S = -82,
  INTERNAL_KEY_T = -36, INTERNAL_KEY_U = -54, INTERNAL_KEY_V = -100, INTERNAL_KEY_W = -34,
  INTERNAL_KEY_X = -67, INTERNAL_KEY_Y = -69, INTERNAL_KEY_Z = -98, INTERNAL_KEY_0 = -40,
  INTERNAL_KEY_1 = -49, INTERNAL_KEY_2 = -50, INTERNAL_KEY_3 = -18, INTERNAL_KEY_4 = -19,
  INTERNAL_KEY_5 = -20, INTERNAL_KEY_6 = -53, INTERNAL_KEY_7 = -37, INTERNAL_KEY_8 = -22,
  INTERNAL_KEY_NINE = -39, INTERNAL_KEY_COMMA = -103, INTERNAL_KEY_EQUALS = -24, INTERNAL_KEY_PERIOD = -104,
  INTERNAL_KEY_SLASH = -105, INTERNAL_KEY_LEFT_BRACKET = -57, INTERNAL_KEY_BACKSLASH = -121, INTERNAL_KEY_RIGHT_BRACKET = -89,
  INTERNAL_KEY_SEMICOLON = -88, INTERNAL_KEY_ESC = -113, INTERNAL_KEY_TAB = -97, INTERNAL_KEY_CAPSLOCK = -65,
  INTERNAL_KEY_SCROLLLOCK = -32, INTERNAL_KEY_NUMLOCK = -78, INTERNAL_KEY_BREAK = -45, INTERNAL_KEY_TILDE = -46,
  INTERNAL_KEY_BACKSPACE = -48, INTERNAL_KEY_INSERT = -62, INTERNAL_KEY_HOME = -63, INTERNAL_KEY_PAGEUP = -64,
  INTERNAL_KEY_PAGEDOWN = -79, INTERNAL_KEY_QUOTES = -80, INTERNAL_KEY_SHIFT = -1, INTERNAL_KEY_LEFT_SHIFT = -4,
  INTERNAL_KEY_RIGHT_SHIFT = -7, INTERNAL_KEY_CTRL = -2, INTERNAL_KEY_LEFT_CTRL = -5, INTERNAL_KEY_RIGHT_CTRL = -8,
  INTERNAL_KEY_ALT = -3, INTERNAL_KEY_LEFT_ALT = -6, INTERNAL_KEY_RIGHT_ALT = -9, INTERNAL_KEY_SPACEBAR = -99,
  INTERNAL_KEY_DELETE = -90, INTERNAL_KEY_RETURN = -74, INTERNAL_KEY_COPY = -106, INTERNAL_KEY_UP_ARROW = -58,
  INTERNAL_KEY_LEFT_ARROW = -26, INTERNAL_KEY_RIGHT_ARROW = -122, INTERNAL_KEY_DOWN_ARROW = -42, INTERNAL_KEY_KEYPAD_0 = -107,
  INTERNAL_KEY_KEYPAD_1 = -108, INTERNAL_KEY_KEYPAD_2 = -125, INTERNAL_KEY_KEYPAD_3 = -109, INTERNAL_KEY_KEYPAD_4 = -123,
  INTERNAL_KEY_KEYPAD_5 = -124, INTERNAL_KEY_KEYPAD_6 = -27, INTERNAL_KEY_KEYPAD_7 = -28, INTERNAL_KEY_KEYPAD_8 = -43,
  INTERNAL_KEY_KEYPAD_9 = -44, INTERNAL_KEY_KEYPAD_PLUS = -59, INTERNAL_KEY_KEYPAD_EQUALS = -60, INTERNAL_KEY_KEYPAD_PERIOD = -77,
  INTERNAL_KEY_KEYPAD_DIVIDE = -75, INTERNAL_KEY_KEYPAD_HASH = -91, INTERNAL_KEY_KEYPAD_MULTIPLY = -92, INTERNAL_KEY_KEYPAD_ENTER = -61,
  INTERNAL_KEY_SELECT_MOUSE_BUTTON = -10, INTERNAL_KEY_MENU_MOUSE_BUTTON = -11, INTERNAL_KEY_ADJUST_MOUSE_BUTTON = -12
}
 Internal key numbers for the keypressed function.
 
enum  ReportErrorReply { NONE, OK, CANCEL }
 Values returned from report error.
 
enum  ReportErrorFlags {
  REF_OK_BUTTON = 1, REF_CANCEL_BUTTON = 2, REF_HIGHLIGHT_CANCEL = 4, REF_NO_SPACE_TO_CONTINUE = 8,
  REF_NO_TITLE_PREFIX = 16, REF_LEAVE_OPEN = 32, REF_CLOSE = 64
}
 Flags for report error. More...
 
enum  SubWindowFlags {
  NEW_WINDOW_FLAGS = 1, ALIGN_LEFT_VISIBLE_LEFT = 0x0010000, ALIGN_LEFT_VISIBLE_RIGHT = 0x0020000, ALIGN_BOTTOM_VISIBLE_BOTTOM = 0x0040000,
  ALIGN_BOTTOM_VISIBLE_TOP = 0x0080000, ALIGN_RIGHT_VISIBLE_LEFT = 0x0100000, ALIGN_RIGHT_VISIBLE_RIGHT = 0x0200000, ALIGN_TOP_VISIBLE_BOTTOM = 0x0400000,
  ALIGN_TOP_VISIBLE_TOP = 0x0800000, ALIGN_X_SCROLL_VISIBLE_LEFT = 0x1000000, ALIGN_X_SCROLL_VISIBLE_RIGHT = 0x2000000, ALIGN_Y_SCROLL_VISIBLE_BOTTOM = 0x4000000,
  ALIGN_Y_SCROLL_VISIBLE_TOP = 0x8000000
}
 Flags specifying how to align a subwindow in it's parent. More...
 
enum  SpriteFormat {
  SF_Colour2dpi90x45 = 0, SF_Colour4dpi45 = 1, SF_Colour2dpi45 = 4, SF_Colour4dpi90x45 = 8,
  SF_Colour16dpi45 = 9, SF_Colour16dpi90x45 = 12, SF_Colour256dpi45 = 13, SF_Colour256dpi90x45 = 15,
  SF_Colour2dpi90 = 18, SF_Colour4dpi90 = 19, SF_Colour16dpi90 = 20, SF_Colour256dpi90 = 21
}
 Standard sprite formats (colour <= 256)
 
enum  SpriteColours {
  SC_Colour2 = 1, SC_Colour4 = 2, SC_Colour16 = 3, SC_Colour256 = 4,
  SC_Colour32K = 5, SC_Colour16M = 6
}
 Sprite colour constant.
 
enum  sprite_plot_action {
  SPA_OVERWRITE, SPA_OR, SPA_AND, SPA_XOR,
  SPA_INVERT, SPA_NONE, SPA_AND_NOT, SPA_OR_NOT,
  SPA_USE_MASK
}
 Enumeration of the plot actions for sprites.
 
enum  ButtonType {
  BUTTONTYPE_IGNORE_CLICKS, BUTTONTYPE_ALWAYS, BUTTONTYPE_CLICK_AUTO, BUTTONTYPE_CLICK_ONCE,
  BUTTONTYPE_RELEASE, BUTTONTYPE_DOUBLE, BUTTONTYPE_CLICK_DRAG, BUTTONTYPE_RELEASE_DRAG,
  BUTTONTYPE_DOUBLE_DRAG, BUTTONTYPE_CLICK_ONCE9, BUTTONTYPE_DOUBLE_CLICK_DRAG, BUTTONTYPE_CLICK_DRAG11,
  BUTTONTYPE_RESERVED12, BUTTONTYPE_RESERVED13, BUTTONTYPE_RESERVED14, BUTTONTYPE_GAIN_FOCUS
}
 Enumeration of the button types for the work area.
 

Functions

void about_to_be_shown_router (IdBlock &id_block, PollBlock &data, Listener *listener)
 Static function to route about to be shown event.
 
Applicationapp ()
 Get the current application instance. More...
 
Clipboardclipboard ()
 Return pointer to the global clipboard. More...
 
template<class T >
void defer_delete (T *obj)
 Function to defer the deletion of an object until the next idle (null) wimp poll. More...
 
bool operator== (const Fixed16 &lhs, const Fixed16 &rhs)
 
bool operator!= (const Fixed16 &lhs, const Fixed16 &rhs)
 
bool operator== (int lhs, const Fixed16 &rhs)
 
bool operator!= (int lhs, const Fixed16 &rhs)
 
bool operator< (int lhs, const Fixed16 &rhs)
 
bool operator> (int lhs, const Fixed16 &rhs)
 
bool operator<= (int lhs, const Fixed16 &rhs)
 
bool operator>= (int lhs, const Fixed16 &rhs)
 
Fixed16operator+= (int &lhs, const Fixed16 &rhs)
 
Fixed16operator-= (int &lhs, const Fixed16 &rhs)
 
Fixed16operator*= (int &lhs, const Fixed16 &rhs)
 
Fixed16operator/= (int &lhs, const Fixed16 &rhs)
 
Fixed16 operator+ (const Fixed16 &lhs, const Fixed16 &rhs)
 
Fixed16 operator- (const Fixed16 &lhs, const Fixed16 &rhs)
 
Fixed16 operator* (const Fixed16 &lhs, const Fixed16 &rhs)
 
Fixed16 operator/ (const Fixed16 &lhs, const Fixed16 &rhs)
 
Fixed16 operator+ (int lhs, const Fixed16 &rhs)
 
Fixed16 operator+ (const Fixed16 &lhs, int rhs)
 
Fixed16 operator- (int lhs, const Fixed16 &rhs)
 
Fixed16 operator- (const Fixed16 &lhs, int rhs)
 
Fixed16 operator* (int lhs, const Fixed16 &rhs)
 
Fixed16 operator* (const Fixed16 &lhs, int rhs)
 
Fixed16 operator/ (int lhs, const Fixed16 &rhs)
 
Fixed16 operator/ (const Fixed16 &lhs, int rhs)
 
bool operator== (double lhs, const Fixed16 &rhs)
 
bool operator!= (double lhs, const Fixed16 &rhs)
 
bool operator< (double lhs, const Fixed16 &rhs)
 
bool operator> (double lhs, const Fixed16 &rhs)
 
bool operator<= (double lhs, const Fixed16 &rhs)
 
bool operator>= (double lhs, const Fixed16 &rhs)
 
double & operator+= (double &lhs, const Fixed16 &rhs)
 
double & operator-= (double &lhs, const Fixed16 &rhs)
 
double & operator*= (double &lhs, const Fixed16 &rhs)
 
double & operator/= (double &lhs, const Fixed16 &rhs)
 
Fixed16 operator+ (double lhs, const Fixed16 &rhs)
 
Fixed16 operator+ (const Fixed16 &lhs, double rhs)
 
Fixed16 operator- (double lhs, const Fixed16 &rhs)
 
Fixed16 operator- (const Fixed16 &lhs, double rhs)
 
Fixed16 operator* (double lhs, const Fixed16 &rhs)
 
Fixed16 operator* (const Fixed16 &lhs, double rhs)
 
Fixed16 operator/ (double lhs, const Fixed16 &rhs)
 
Fixed16 operator/ (const Fixed16 &lhs, double rhs)
 
std::ostream & operator<< (std::ostream &os, const Fixed16 &num)
 
std::istream & operator>> (std::istream &is, Fixed16 &num)
 
int os_to_points (int os)
 
int points_to_os (int points)
 
int os_to_points_16th (int os)
 
int points_16th_to_os (int point16th)
 
int os_to_millipoints (int os)
 
int millipoints_to_os (int millipoint)
 
void gadget_copy_value (Gadget &from_gadget, Gadget &to_gadget)
 Copy the main value property from one gadget to another. More...
 
void has_been_hidden_router (IdBlock &id_block, PollBlock &data, Listener *listener)
 Static function to route has been hidden event.
 
bool key_pressed (InternalKey key_code)
 Check if a key is being pressed when this function is called. More...
 
std::string message (const std::string &token)
 Shortcut to the tbx::app()->messages().message(...)
 
std::string message (const std::string &token, const std::string &arg0, int max_size)
 Shortcut to the tbx::app()->messages().message(...)
 
std::string message (const std::string &token, const std::string &arg0, const std::string &arg1, int max_size)
 Shortcut to the tbx::app()->messages().message(...)
 
std::string message (const std::string &token, const std::string &arg0, const std::string &arg1, const std::string &arg2, int max_size)
 Shortcut to the tbx::app()->messages().message(...)
 
std::string message (const std::string &token, const std::string &arg0, const std::string &arg1, const std::string &arg2, const std::string &arg3, int max_size)
 Shortcut to the tbx::app()->messages().message(...)
 
std::string gsmessage (const std::string &token, int max_size)
 Shortcut to the tbx::app()->messages().gsmessage(...)
 
std::string gsmessage (const std::string &token, const std::string &arg0, int max_size)
 Shortcut to the tbx::app()->messages().gsmessage(...)
 
std::string gsmessage (const std::string &token, const std::string &arg0, const std::string &arg1, int max_size)
 Shortcut to the tbx::app()->messages().gsmessage(...)
 
std::string gsmessage (const std::string &token, const std::string &arg0, const std::string &arg1, const std::string &arg2, int max_size)
 Shortcut to the tbx::app()->messages().gsmessage(...)
 
std::string gsmessage (const std::string &token, const std::string &arg0, const std::string &arg1, const std::string &arg2, const std::string &arg3, int max_size)
 Shortcut to the tbx::app()->messages().gsmessage(...)
 
void show_message (const std::string &msg, const std::string &title, const std::string &sprite_name, tbx::Command *close_command, bool delete_command)
 Show a message in a window centred in the screen. More...
 
void show_message_as_menu (const std::string &msg, const std::string &title, const std::string &sprite_name, tbx::Command *close_command, bool delete_command)
 Show a message in a window centred in the screen in the same way as a menu is shown. More...
 
unsigned int monotonic_time ()
 Read the time in centiseconds since the system was last reset. More...
 
unsigned int monotonic_elapsed (unsigned int from, unsigned int to)
 Return the elapsed time taking into account the wrap around for unsigned integers. More...
 
bool monotonic_lt (unsigned int compare, unsigned int to)
 Compare if one time is less than another taking into account wrap around. More...
 
bool monotonic_le (unsigned int compare, unsigned int to)
 Compare if one time is less than or equals to another taking into account wrap around. More...
 
bool monotonic_gt (unsigned int compare, unsigned int to)
 Compare if one time is greater than another taking into account wrap around. More...
 
bool monotonic_ge (unsigned int compare, unsigned int to)
 Compare if one time is greater than or equal to another taking into account wrap around. More...
 
void raise_os_error (_kernel_oserror *err)
 Function to throw a OS error as the OSError class. More...
 
void show_question (const std::string &question, const std::string &title, tbx::Command *yes_command, tbx::Command *no_command, bool delete_commands)
 Show a question in a window centred in the screen. More...
 
void show_question_as_menu (const std::string &question, const std::string &title, tbx::Command *yes_command, tbx::Command *no_command, bool delete_commands)
 Show a question in a window centred in the screen. More...
 
ReportErrorReply report_error (_kernel_oserror *err, const char *title, int flags)
 Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue. More...
 
ReportErrorReply report_error (_kernel_oserror *err, int flags)
 Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue. More...
 
ReportErrorReply report_error (const char *msg, int flags)
 Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue. More...
 
ReportErrorReply report_error (const char *msg, const char *title, int flags)
 Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue. More...
 
ReportErrorReply report_error (const std::string &msg, int flags)
 Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue. More...
 
ReportErrorReply report_error (const std::string &msg, const std::string &title, int flags)
 Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue. More...
 
void report_error_close (ReportErrorReply reply)
 Close the report error dialogue. More...
 
int sprite_mode (SpriteColours colours, int horzDpi=90, int vertDpi=90)
 Return new format sprite mode. More...
 
template<class T >
std::string to_string (const T &value)
 Convert a value to a string.
 
std::string to_string (const std::string &value)
 Specialisation for std::string.
 
std::string to_string (const char *value)
 Specialisation for constant null terminated string.
 
std::string to_string (char *value)
 Specialisation for null terminated string.
 
template<class T >
from_string (const std::string &str)
 Convert a string to another type.
 
std::string to_upper (const std::string &value)
 Return string converted to upper case.
 
std::string to_lower (const std::string &value)
 Return string converted to lower case.
 
bool equals_ignore_case (const std::string &s1, const std::string &s2)
 Compare two strings ignoring case.
 
bool equals_ignore_case (const std::string &s1, const char *cs2)
 Compares two string ignoring case.
 
bool equals_ignore_case (const char *cs1, const std::string &s2)
 Compares two string ignoring case.
 
bool equals_ignore_case (const char *cs1, const char *cs2)
 Compares two string ignoring case.
 
int compare_ignore_case (const char *cs1, const char *cs2)
 Compares two strings ignoring case. More...
 
int compare_ignore_case (const std::string &s1, const char *cs2)
 Compares two strings ignoring case. More...
 
int compare_ignore_case (const char *cs1, const std::string &s2)
 Compares two strings ignoring case. More...
 
int compare_ignore_case (const std::string &s1, const std::string &s2)
 Compares two strings ignoring case. More...
 
std::string::size_type find_ignore_case (const std::string &s, std::string f, std::string::size_type start=0)
 Find a string in another ignoring case. More...
 
void swix_check (_kernel_oserror *err)
 Simple function to throw an OsError exception if an OS returned error values is not 0. More...
 

Variables

const ObjectId NULL_ObjectId = ObjectId(0)
 NULL object id.
 
const ComponentId NULL_ComponentId = ComponentId(-1)
 NULL component id.
 
const int FILE_TYPE_DIRECTORY = 0x1000
 Special file type returned for a directory.
 
const int FILE_TYPE_APPLICATION = 0x2000
 Special file type returned for an application directory. More...
 
const int SPRITE_NAMELEN = 13
 Maximum length of a sprite name including a terminating character 0.
 
const OsSpriteAreaPtr WIMP_SPRITEAREA = (OsSpriteAreaPtr)1
 Constant representing the WIMP sprite area.
 
const int URI_MReturnResult = 0x4E383
 
const int FIRST_USER_EID = 1
 First event ID available to be used in any application.
 
const int LAST_USER_EID = 0x4FFF
 Last event ID available to be used in any application.
 
const int FIRST_SHARE_EID = 0x5000
 First event ID available to be shared between multiple applications.
 
const int LAST_SHARE_EID = 0x5FFF
 Last event ID available to be shared between multiple applications.
 
const int FIRST_DYNAMIC_EID = 0x6000
 First event ID for dynamically allocated IDs.
 
const int LAST_DYNAMIC_EID = 0x6FFF
 Last event ID for dynamically allocated IDs.
 
const int FIRST_TBX_EID = 0x7000
 First event ID reserved for the TBX library.
 
const int LAST_TBX_EID = 0x7FFF
 Last event ID reserved for the TBX library.
 

Detailed Description

A library for creating RISC OS toolbox applications.

Enumeration Type Documentation

◆ DrawFillStyle

Enumeration to set the fill style when filling shapes.

It should consist of one of the winding rules ored with the other values as required

Enumerator
WINDING_NON_ZERO 

non-zero winding number rule.

WINDING_NEGATIVE 

negative winding number rule.

WINDING_EVEN_ODD 

even-odd winding number rule.

WINDING_POSITIVE 

positive winding number rule.

PLOT_NON_BOUNDARY_EXTERIOR 

plot non-boundary exterior pixels.

PLOT_BOUNDARY_EXTERIOR 

plot boundary exterior pixels.

PLOT_BOUNDARY_INTERIOR 

plot boundary interior pixels.

PLOT_NON_BOUNDARY_INTERIOR 

plot non-boundary interior pixels.

PLOT_ALL_AT_ONCE 

Used with DrawPath::stroke, will only plot each pixel once at the cost of more temporary workspace.

◆ ReportErrorFlags

Flags for report error.

Enumerator
REF_OK_BUTTON 

Provide an OK button.

REF_CANCEL_BUTTON 

Provide a Cancel button.

REF_HIGHLIGHT_CANCEL 

Highlight the cancel button.

REF_NO_SPACE_TO_CONTINUE 

In a text-style window do not prompt to continue.

REF_NO_TITLE_PREFIX 

Don't prefix application name with error from title bar.

REF_LEAVE_OPEN 

Return immediately leaving window open - Note you must close the box before the next WIMP poll.

REF_CLOSE 

Select one box depending on bit 0 and 1 and close window.

◆ SubWindowFlags

Flags specifying how to align a subwindow in it's parent.

It also can specify new furniture flags for a window.

Enumerator
NEW_WINDOW_FLAGS 

Use the window flags from the ShowSubWindowSpec structure.

ALIGN_LEFT_VISIBLE_LEFT 

Left edge linked to left of visible area.

ALIGN_LEFT_VISIBLE_RIGHT 

Left edge linked to right of visible area.

ALIGN_BOTTOM_VISIBLE_BOTTOM 

Bottom edge linked to bottom of visible area.

ALIGN_BOTTOM_VISIBLE_TOP 

Bottom edge linked to right of visible area.

ALIGN_RIGHT_VISIBLE_LEFT 

Right edge linked to left of visible area.

ALIGN_RIGHT_VISIBLE_RIGHT 

Right edge linked to right of visible area.

ALIGN_TOP_VISIBLE_BOTTOM 

Top edge linked to bottom of visible area.

ALIGN_TOP_VISIBLE_TOP 

Top edge linked to top of visible area.

ALIGN_X_SCROLL_VISIBLE_LEFT 

X scroll linked to left of visible area.

ALIGN_X_SCROLL_VISIBLE_RIGHT 

X scroll linked to right of visible area.

ALIGN_Y_SCROLL_VISIBLE_BOTTOM 

Y scroll linked to bottom of visible area.

ALIGN_Y_SCROLL_VISIBLE_TOP 

Y scroll linked to top of visible area.

Function Documentation

◆ app()

Application* tbx::app ( )
inline

Get the current application instance.

Returns
A pointer to the current application.

◆ clipboard()

Clipboard* tbx::clipboard ( )
inline

Return pointer to the global clipboard.

Data can be added to the clipboard by using any of the copy() methods To paste data you should have claimed the caret/selection with claim_caret() and call the paste() method.

◆ compare_ignore_case() [1/4]

int tbx::compare_ignore_case ( const char *  cs1,
const char *  cs2 
)
inline

Compares two strings ignoring case.

Returns
< 0 if string 1 is < string 2 0 if equal > 0 if string 1 is > string 2

◆ compare_ignore_case() [2/4]

int tbx::compare_ignore_case ( const char *  cs1,
const std::string &  s2 
)
inline

Compares two strings ignoring case.

Returns
< 0 if string 1 is < string 2 0 if equal > 0 if string 1 is > string 2

◆ compare_ignore_case() [3/4]

int tbx::compare_ignore_case ( const std::string &  s1,
const char *  cs2 
)
inline

Compares two strings ignoring case.

Returns
< 0 if string 1 is < string 2 0 if equal > 0 if string 1 is > string 2

◆ compare_ignore_case() [4/4]

int tbx::compare_ignore_case ( const std::string &  s1,
const std::string &  s2 
)
inline

Compares two strings ignoring case.

Returns
< 0 if string 1 is < string 2 0 if equal > 0 if string 1 is > string 2

◆ defer_delete()

template<class T >
void tbx::defer_delete ( T *  obj)

Function to defer the deletion of an object until the next idle (null) wimp poll.

Parameters
objobject to delete.

◆ find_ignore_case()

std::string::size_type tbx::find_ignore_case ( const std::string &  s,
std::string  f,
std::string::size_type  start = 0 
)
inline

Find a string in another ignoring case.

Parameters
sstring to search
fstring to look for
startstart position (defaults to 0)
Returns
position found or std::string::npos if not found

◆ gadget_copy_value()

void tbx::gadget_copy_value ( Gadget from_gadget,
Gadget to_gadget 
)
inline

Copy the main value property from one gadget to another.

Both gadgets should be of the same type and have the same configuration. Gadgets supported are: Button (text only), DisplayField, NumberRange, OptionButton, RadioButton, Slider, StringSet and WritableField.

Parameters
from_gadgetthe gadget to copy the value from
to_gadgetthe gadget to copy the value to

◆ key_pressed()

bool tbx::key_pressed ( InternalKey  key_code)
inline

Check if a key is being pressed when this function is called.

Parameters
key_codeInternal key code
Returns
true if key is pressed

◆ millipoints_to_os()

int tbx::millipoints_to_os ( int  millipoint)
inline
Convert from millipoints to OS units

Note: assumes 180 OS units per inch - also rounds down 1 points is 1/72 of an inch

Parameters
millipointnumber of millipoints to convert
Returns
number of OS units equivalent

◆ monotonic_elapsed()

unsigned int tbx::monotonic_elapsed ( unsigned int  from,
unsigned int  to 
)
inline

Return the elapsed time taking into account the wrap around for unsigned integers.

Parameters
fromtime to measure from
totime to measure to

◆ monotonic_ge()

bool tbx::monotonic_ge ( unsigned int  compare,
unsigned int  to 
)
inline

Compare if one time is greater than or equal to another taking into account wrap around.

Parameters
comparevalue to check to see if it is less than
tovalue to compare to
Returns
true if compare >= to.

◆ monotonic_gt()

bool tbx::monotonic_gt ( unsigned int  compare,
unsigned int  to 
)
inline

Compare if one time is greater than another taking into account wrap around.

Parameters
comparevalue to check to see if it is less than
tovalue to compare to
Returns
true if compare > to.

◆ monotonic_le()

bool tbx::monotonic_le ( unsigned int  compare,
unsigned int  to 
)
inline

Compare if one time is less than or equals to another taking into account wrap around.

Parameters
comparevalue to check to see if it is less than
tovalue to compare to
Returns
true if compare <= to.

◆ monotonic_lt()

bool tbx::monotonic_lt ( unsigned int  compare,
unsigned int  to 
)
inline

Compare if one time is less than another taking into account wrap around.

Parameters
comparevalue to check to see if it is less than
tovalue to compare to
Returns
true if compare < to.

◆ monotonic_time()

unsigned int tbx::monotonic_time ( )
inline

Read the time in centiseconds since the system was last reset.

As the result it stored in an unsigned integer it will wrap around after approximately 497 days.

Returns
the number of centiseconds since the system was last reset

◆ os_to_millipoints()

int tbx::os_to_millipoints ( int  os)
inline
Convert from OS units to millipoints

Note: assumes 180 os units per inch - also rounds down 1 points is 1/72 of an inch

Parameters
osOS units to convert
Returns
number of millipoints equivalent

◆ os_to_points()

int tbx::os_to_points ( int  os)
inline
Convert from OS units to points

Note: assumes 180 OS units per inch - also rounds down 1 points is 1/72 of an inch

Parameters
osOS units to convert
Returns
number of points equivalent

◆ os_to_points_16th()

int tbx::os_to_points_16th ( int  os)
inline
Convert from OS units to 16th of a point

Note: assumes 180 os units per inch - also rounds down 1 points is 1/72 of an inch

Parameters
osOS units to convert
Returns
number of 16ths of a point equivalent

◆ points_16th_to_os()

int tbx::points_16th_to_os ( int  point16th)
inline
Convert from 16ths of a point to OS units

Note: assumes 180 OS units per inch - also rounds down 1 points is 1/72 of an inch

Parameters
point16thnumber of 16ths of a points to convert
Returns
number of OS units equivalent

◆ points_to_os()

int tbx::points_to_os ( int  points)
inline
Convert from points to OS units

Note: assumes 180 OS units per inch - also rounds down 1 points is 1/72 of an inch

Parameters
pointsnumber of points to convert
Returns
number of OS units equivalent

◆ raise_os_error()

void tbx::raise_os_error ( _kernel_oserror *  err)
inline

Function to throw a OS error as the OSError class.

Parameters
errthe OS error to throw

◆ report_error() [1/6]

ReportErrorReply tbx::report_error ( _kernel_oserror *  err,
const char *  title,
int  flags 
)

Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.

This dialogue stops interaction with the desktop until it is dismissed so it is not recommended for general error reporting.

Parameters
errAn error block (usually return from an OS call) for the error message
titlethe caption for the error dialogue
flagsone or more of the ReportErrorFlags enum (default 0 show OK button)
Returns
A value from ReportErrorReply specifying how the error box was closed.

◆ report_error() [2/6]

ReportErrorReply tbx::report_error ( _kernel_oserror *  err,
int  flags 
)

Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.

This dialogue stops interaction with the desktop until it is dismissed so it is not recommended for general error reporting.

This version uses the application name as the title.

Parameters
errAn error block (usually return from an OS call) for the error message
flagsone or more of the ReportErrorFlags enum (default 0 show OK button)
Returns
A value from ReportErrorReply specifying how the error box was closed.

◆ report_error() [3/6]

ReportErrorReply tbx::report_error ( const char *  msg,
const char *  title,
int  flags 
)

Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.

This dialogue stops interaction with the desktop until it is dismissed so it is not recommended for general error reporting.

Parameters
msgText for the error message (this will be truncated to 251 characters)
titlethe caption for the error dialogue
flagsone or more of the ReportErrorFlags enum (default 0 show OK button)
Returns
A value from ReportErrorReply specifying how the error box was closed.

◆ report_error() [4/6]

ReportErrorReply tbx::report_error ( const char *  msg,
int  flags 
)

Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.

This dialogue stops interaction with the desktop until it is dismissed so it is not recommended for general error reporting.

This version uses the application name as the title.

Parameters
msgText for the error message (this will be truncated to 251 characters)
flagsone or more of the ReportErrorFlags enum (default 0 show OK button)
Returns
A value from ReportErrorReply specifying how the error box was closed.

◆ report_error() [5/6]

ReportErrorReply tbx::report_error ( const std::string &  msg,
const std::string &  title,
int  flags 
)

Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.

This dialogue stops interaction with the desktop until it is dismissed so it is not recommended for general error reporting.

Parameters
msgText for the error message (this will be truncated to 251 characters)
titlethe caption for the error dialogue
flagsone or more of the ReportErrorFlags enum (default 0 show OK button)
Returns
A value from ReportErrorReply specifying how the error box was closed.

◆ report_error() [6/6]

ReportErrorReply tbx::report_error ( const std::string &  msg,
int  flags 
)

Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.

This dialogue stops interaction with the desktop until it is dismissed so it is not recommended for general error reporting.

This version uses the application name as the title.

Parameters
msgText for the error message (this will be truncated to 251 characters)
flagsone or more of the ReportErrorFlags enum (default 0 show OK button)
Returns
A value from ReportErrorReply specifying how the error box was closed.

◆ report_error_close()

void tbx::report_error_close ( ReportErrorReply  reply)

Close the report error dialogue.

The report error dialogue would be left open if the REF_LEAVE_OPEN flag had been specified in a call to report_error. In this case you must call report_error_close before the next call to WIMP_Poll.

◆ show_message()

void tbx::show_message ( const std::string &  msg,
const std::string &  title,
const std::string &  sprite_name,
tbx::Command close_command,
bool  delete_command 
)

Show a message in a window centred in the screen.

This shows the window and returns immediately. It is appropriate to use instead of report_error as it allows the current and all other applications to multi-task while the message is shown.

Parameters
msgThe text of the message. This can be multi-line and the window will be resized to fit it.
titleThe title of the message box. Use "" (the default) for the default title.
sprite_nameThe name of the sprite for the window. Use "" (the default) to keep the sprite name in the Message resource. Useful sprites for this provided with RISC OS include "information", "warning" and "error".
close_command- command to run when message window is closed
delete_command- true to delete the command after it has been run

◆ show_message_as_menu()

void tbx::show_message_as_menu ( const std::string &  msg,
const std::string &  title,
const std::string &  sprite_name,
tbx::Command close_command,
bool  delete_command 
)

Show a message in a window centred in the screen in the same way as a menu is shown.

This shows the window and returns immediately. It is appropriate to use instead of report_error as it allows the current and all other applications to multi-task while the message is shown.

The window is closed if the OK button is selected or the mouse is clicked outside the window. If a close command is set it is run in both of these cases.

Parameters
msgThe text of the message. This can be multi-line and the window will be resized to fit it.
titleThe title of the message box. Use "" (the default) to use the default.
sprite_nameThe name of the sprite for the window. Use "" (the default) to keep the sprite name in the Message resource. Useful sprites for this provided with RISC OS include "information", "warning" and "error".
close_command- command to run when message window is closed
delete_command- true to delete the command after it has been run

◆ show_question()

void tbx::show_question ( const std::string &  question,
const std::string &  title,
tbx::Command yes_command,
tbx::Command no_command,
bool  delete_commands 
)

Show a question in a window centred in the screen.

This shows the window and returns immediately. The commands given are run when the use clicks on the appropriate button.

Parameters
questionThe question to ask.
titleThe title of the message box. Use "" for the default.
yes_commandcommand to run if yes is chosen or 0 for none.
no_commandcommand to run if no is chosen or 0 (the default) for none
delete_commandstrue if yes and no commands should be deleted when question window closes. Defaults to false.

◆ show_question_as_menu()

void tbx::show_question_as_menu ( const std::string &  question,
const std::string &  title,
tbx::Command yes_command,
tbx::Command no_command,
bool  delete_commands 
)

Show a question in a window centred in the screen.

This shows the window and returns immediately. The commands given are run when the use clicks on the appropriate button.

Selecting the "Yes" or "No" button or clicking outside the window close the window. A command is not run if the window is closed by clicking outside of it.

Parameters
questionThe text of the question. This can be multi-line and the window will be resized to fit it.
titleThe title of the message box. Use "" to use the default.
yes_commandcommand to run if yes is chosen or 0 for none.
no_commandcommand to run if no is chosen or 0 (the default) for none
delete_commandstrue if yes and no commands should be deleted when question window closes. Defaults to false.

◆ sprite_mode()

int tbx::sprite_mode ( SpriteColours  colours,
int  horzDpi = 90,
int  vertDpi = 90 
)
inline

Return new format sprite mode.

Can only be used in Risc OS 3.5 and later.

Parameters
coloursconstant to specify number of colours
horzDpi- horizontal dots per inch
vertDpi- vertical dots per inch

◆ swix_check()

void tbx::swix_check ( _kernel_oserror *  err)
inline

Simple function to throw an OsError exception if an OS returned error values is not 0.

Parameters
errerror number to check or convert to an exception if not 0

Variable Documentation

◆ FILE_TYPE_APPLICATION

const int tbx::FILE_TYPE_APPLICATION = 0x2000

Special file type returned for an application directory.

i.e. a directory where the first character is a '!'