This class defines the common behaviour of all user interface interaction entity.
![]() | cursor The normal mouse cursor to be used in this interactor. |
![]() | PInteractor ( PInteractor * parent, BOOL hiddenChild = FALSE ) Create a a new interactor attaching it to the parent interactor. |
![]() | ~PInteractor () Destroy the interactor, and all its child interactors. |
![]() | Compare ( const PObject & obj ) const Determine if the two interactors are the same. |
![]() | GetParent () const Get the interactor layout that this interactor is contained in. |
![]() | IsChild ( PInteractor * parent ) const Determine if this interactor is a child or grandchild etc of the interactor layout specified. |
![]() | GetNumChildren () Get the number of children the interactor currently contains. |
![]() | operator[] ( PINDEX index ) Get access to the child interactor at the specified index. |
![]() | UpdateCommandSources () Update all command sources. |
![]() | SetFont ( const PFont & newFont, BOOL toChildren = TRUE ) Set the font to be used by default by this interactor. |
![]() | GetFont () Get the font to be used by default in all child interactors. |
![]() | ToPixelsDX ( PDIMENSION x ) const Convert the layout X coordinate value to screen pixels. |
![]() | ToPixelsDY ( PDIMENSION y ) const Convert the layout Y coordinate value to screen pixels. |
![]() | ToPixelsX ( PORDINATE x ) const Convert the layout X coordinate value to screen pixels. |
![]() | ToPixelsY ( PORDINATE y ) const Convert the layout Y coordinate value to screen pixels. |
![]() | ToPixels ( const PDim & dim ) const Convert the layout dimension value to screen pixels. |
![]() | ToPixels ( const PPoint & pt ) const Convert the layout point value to screen pixels. |
![]() | ToPixels ( const PRect & r ) const Convert the layout rectange value to screen pixels. |
![]() | FromPixelsDX ( PDIMENSION x ) const Convert the screen pixels to a layout X coordinate value. |
![]() | FromPixelsDY ( PDIMENSION y ) const Convert the screen pixels to a layout Y coordinate value. |
![]() | FromPixelsX ( PORDINATE x ) const Convert the screen pixels to a layout X coordinate value. |
![]() | FromPixelsY ( PORDINATE y ) const Convert the screen pixels to a layout Y coordinate value. |
![]() | FromPixels ( const PDim & dim ) const Convert the dimensions in screen pixels to layout coordinates. |
![]() | FromPixels ( const PPoint & pt ) const Convert the point in screen pixels to layout coordinates. |
![]() | FromPixels ( const PRect & r ) const Convert the rectangle in screen pixels to layout coordinates. |
![]() | SetPosition ( PORDINATE x, PORDINATE y, PositionOrigin xOrigin = TopLeftParent, PositionOrigin yOrigin = TopLeftParent ) Set the position of the interactor. |
![]() | GetPosition ( CoordinateSystem coords ) const Get the position of the interactor relative to its parent. |
![]() | ToScreen ( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const Convert the point from the interactor relative coordinates to absolute screen coordinates. |
![]() | FromScreen ( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const Convert the point from the absolute screen coordinates to interactor relative coordinates. |
![]() | SetDimensions ( PDIMENSION width, PDIMENSION height, CoordinateSystem coords ) Set the dimensions of the interactor. |
![]() | GetDimensions ( CoordinateSystem coords ) const Get the dimensions of the interactor. |
![]() | GetStructureBounds ( CoordinateSystem coords ) const Get the external bounds of the interactor. |
![]() | GetDrawingBounds ( CoordinateSystem coords ) const Get the drawing bounds for the interactor. |
![]() | AutoAdjustBounds ( PRect & bounds, AutoAdjustType type = AdjustBounds ) Adjust the interactor relative to the specified bounds rect. |
![]() | ContainsPoint ( const PPoint & pt, CoordinateSystem coords ) const Determine if the point specified is inside the interactors area. |
![]() | FindInteractor ( const PPoint & pt, CoordinateSystem coords ) const Find the interactor that is at the specified coordinates. |
![]() | Enable ( BOOL enabled = TRUE ) Enable or disable the interactor. |
![]() | Disable () Disable the interactor, ignoring all input to it. |
![]() | IsEnabled () const Determine if the interactor is enabled and input may be processed. |
![]() | ShowAll () Show the interactor and all child and grandchild etc interactors. |
![]() | Show ( BOOL visible = TRUE ) Show or hide the interactor. |
![]() | Hide () Hide the interactor from view. |
![]() | IsVisible () const Determine if interactor may be visible. |
![]() | BringToTop () Bring the interactor to the top of any layering order for overlapping windows or interactors. |
![]() | IsOnTop () const Determine if the interactor is currently on top of any layering order for overlapping windows or interactors. |
![]() | Invalidate ( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords ) Mark the area of the interactor as requiring a redraw. |
![]() | Validate ( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords ) Mark the area of the interactor as not requiring a redraw. |
![]() | Update () Force an immediate update of the window. |
![]() | GrabMouse () Grab the mouse for exclusive use by this interactor. |
![]() | ReleaseMouse () Relenquish the exclusive use of the mouse after a GrabMouse() call. |
![]() | HasMouse () const Determine if this interactor currently has exclusive use of the mouse pointer. |
![]() | GrabFocus () Make this interactor have the user keyboard input focus. |
![]() | HasFocus () const Determine if this interactor currently has the keyboard focus. |
![]() | SetCursor ( const PCursor & newCursor ) Set the cursor to be used for this interactor. |
![]() | GetCursor () const Get the current cursor shape that is being used whenever the mouse pointer is over this interactor. |
![]() | SetCursorToParent ( BOOL useParent = TRUE ) Set the cursor to always be whatever the interactors parent is using as a cursor shape. |
![]() | SetAllCursors ( const PCursor & newCursor ) Set the current cursor to the new shape and set all child interactors to temporarily use that cursor. |
![]() | RestoreAllCursors () Restore the current cursor and all child interactors cursor to parent flags to the state as of the previous call to SetAllCursors() |
![]() | SetWaitCursor () Set the cursor for this interactor and all child interactors to the platform dependent standard |
![]() | SetCursorPos ( PORDINATE x, PORDINATE y, CoordinateSystem coords ) Set the position of the cursor. |
![]() | GetCursorPos ( CoordinateSystem coords ) const Get the current cursor position in the interactors coordinate system. |
![]() | ShowCursor ( BOOL show = TRUE ) Show or hide the mouse cursor. |
![]() | HideCursor () Hide the mouse cursor, this is equivalent to ShowCursor(FALSE) |
![]() | SetCaret ( const PCaret & newCaret ) Set the text caret shape to be as specified. |
![]() | GetCaret () const Get the current text caret shape. |
![]() | SetCaretPos ( PORDINATE x, PORDINATE y, CoordinateSystem coords ) Set the position of the text caret within the interactor. |
![]() | GetCaretPos ( CoordinateSystem coords ) const Get the position of the text caret within the interactor. |
![]() | ShowCaret (BOOL show = TRUE) Show or hide the text caret. |
![]() | HideCaret () Hide the text caret, this is equivalent to ShowCaret(FALSE) |
![]() | SetForegroundColour ( const PColour & newColour ) Set the default foreground colour of the interactor. |
![]() | GetForegroundColour () const Get the default foreground colour of the interactor. |
![]() | SetBackgroundColour ( const PColour & newColour ) Set the default background colour of the interactor. |
![]() | GetBackgroundColour () const Get the default background colour of the interactor. |
![]() | GetBorderSize () const Get the width of vertical border and height of horizontal border for this interactor. |
![]() | GetBorderColour () const Get the colour of the interactors border. |
![]() | StartMouseTrack ( BOOL wantsCanvas = FALSE ) Begin a mouse track operation, calling the OnMouseTrack() function for each mouse move. |
![]() | OnMouseMove ( PKeyCode button, const PPoint & where ) The system calls this whenever the mouse moves over the interactors usable area. |
![]() | OnMouseDown ( PKeyCode button, const PPoint & where, BOOL doubleClick ) The system calls this whenever a mouse button is pressed in the interactors usable area. |
![]() | OnMouseUp ( PKeyCode button, const PPoint & where ) The system calls this whenever a mouse button is released in the interactors usable area. |
![]() | OnKeyDown ( PKeyCode key, unsigned repeat ) The system calls this whenever a keyboard key was pressed and this interactor had the focus. |
![]() | OnKeyUp ( PKeyCode key ) The system calls this whenever a keyboard key was released and this interactor had the focus. |
![]() | OnKeyInput ( const PString & str ) The system calls this whenever a keyboard key was pressed and this interactor had the focus. |
![]() | OnGainFocus () The system calls this whenever the interactor is given the focus from another window in the system. |
![]() | OnLostFocus () The system calls this whenever the interactor had the focus and it has been changed to another window in the system. |
![]() | OnStartInput () The system calls this whenever the interactor is given the focus the first time for a given PTitledWindow or PInteractorLayout. |
![]() | OnEndInput () The system calls this whenever the system wishes to change focus to another interactor in a given PTitledWindow or PInteractorLayout. |
![]() | OnRedraw ( PCanvas & canvas ) The system calls this whenever it requires that the interactors usable area needs to be updated and redrawn. |
![]() | OnControlNotify ( PControl & control, int option ) This function is called whenever a control needs to notify its parent interactor that somthing has happened to it. |
![]() | OnSelectHelp () This function is called whenever a help select mode is activated and this interactor is selected |
![]() | OnBalloonHelp () This function is called whenever a balloon help function for the interactor is required. |
![]() | OnMouseTrack ( PCanvas * canvas, const PPoint & where, BOOL lastTrack ) This function is called whenever a drag track is in progress. |
![]() | _SetPosition ( PORDINATE x, PORDINATE y, PositionOrigin xOrigin, PositionOrigin yOrigin ) Set the position of the interactor. |
![]() | Overrides from class PObject |
![]() | New functions for class |
![]() | System callback functions. |
![]() | owner The interactors owner application |
![]() | parent The interactor layout that contains this interactor. |
![]() | children The list of children in this interactor layout. |
![]() | font The font used by the interactor. |
![]() | savedCursor The saved mouse cursor to be used in this interactor after a call to RestoreAllCursors(). |
![]() | caret The text caret to be used in this interactor. |
![]() | caretPosition The current location of the caret (in pixels). |
![]() | caretVisible The current count for visibility of caret in interactor. |
![]() | foregroundColour The foreground colour used in this interactor |
![]() | backgroundColour The background colour used in this interactor |
![]() | mouseTrackInteractor The interactor used in the dracking of a drag operation, if NULL no drag track is happening. |
![]() | mouseTrackCanvas The canvas used in the dracking of a drag operation, if NULL no drag track is happening. |
![]() | PInteractor () Special constructor used with PTopLevelWindow. |
![]() | _SetDimensions ( PDIMENSION width, PDIMENSION height, CoordinateSystem coords ) Set the dimensions of the interactor. |
![]() | _Invalidate ( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords ) Mark the area of the interactor as requiring a redraw. |
![]() | _Validate ( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords ) Mark the area of the interactor as not requiring a redraw. |
![]() | _SetCursorPos ( PORDINATE x, PORDINATE y, CoordinateSystem coords ) Set the position of the cursor. |
![]() | _SetCaretPos ( PORDINATE x, PORDINATE y, CoordinateSystem coords ) Set the position of the text caret within the interactor. |
![]() | SetFocusInteractor ( PInteractor * interactor ) Set the child interactor that has the focus in the PTitledWindow or PInteractorLayout. |
![]() | GetFocusInteractor () const Get the child interactor that has the focus in the PTitledWindow or PInteractorLayout. |
![]() | UpdateMyCommandSources () Scan through all child interactors and if they are a command source, execute their notification function to enable or disable the item. |
![]() | New functions for class |
![]() | Flag to indicate that the parent interactor layouts cursor should be used with this interactor. |
This class defines the common behaviour of all user interface interaction entity. This may or may not be a "Window" depending on the definition of that term in the target GUI.
The PCommandSource and PCommandSink classes are usually
used in conjunction with this function to control commands such as menu
items and tool bars etc.
This also determines the coordinate system to be used for laying out
child interactors via the SetPosition() and
SetDimensions() functions. The coordinates used are 1/4 average
font width and 1/8 the font height. If the toChildren parameter is TRUE then the font is
propagated down to all child interactors and grandchild interactors etc.
This also determines the coordinate system to be used for laying out
child interactors via the SetPosition() and
SetDimensions() functions. The coordinates used are 1/4 average
font width and 1/8 the font height.
When scaling is used (eg xOrigin = TopLeftParent), the
coordinates used are 1/4 average font width and 1/8 the font height. Note that some child interactors are clipped to be within their
parent. For these interactors, setting relative to the screen may cause
the interactor to become invisible.
No scaling factor will be applied and x and y offset will be applied
in screen pixels. Offsets of zero will place the interactor in the
top left corner of the screen. Negative offsets will start to move
the interactor off the screen.
No scaling factor will be applied and x and y offset will be applied
in screen pixels. Offsets of zero will place the interactor in the
centre of the screen.
No scaling factor will be applied and x and y offset will be applied
in screen pixels. Offsets of zero will place the interactor in the
bottom right corner of the screen. Positive offsets will start to move
the interactor off the screen.
The coordinates are scaled according to the currently selected font
for the interactor. Offsets of zero will place the interactor in the
top left corner of the parent. Negative offsets will start to move
the interactor off the parent interactor.
The coordinates are scaled according to the currently selected font
for the interactor. Offsets of zero will place the interactor in the
centre of the parent.
The coordinates are scaled according to the currently selected font
for the interactor. Offsets of zero will place the interactor in the
bottom right corner of the parent. Positive offsets will start to move
the interactor off the parent interactor.
No scaling factor will be applied and x and y offset will be applied
in screen pixels. Offsets of zero will place the interactor in the
top left corner of the parent. Negative offsets will start to move
the interactor off the parent interactor.
No scaling factor will be applied and x and y offset will be applied
in screen pixels. Offsets of zero will place the interactor in the
centre of the parent.
No scaling factor will be applied and x and y offset will be applied
in screen pixels. Offsets of zero will place the interactor in the
bottom right corner of the parent. Positive offsets will start to move
the interactor off the parent interactor.
Note that this sets the position of the exterior of the interactor,
including any decoration, eg title bars etc. When scaling is used (eg xOrigin = TopLeftParent), the
coordinates used are 1/4 average font width and 1/8 the font height. The user should not override this function. If some form of action is
required on changing the interactors position then the
_SetPosition() function should be overridden.
If the coords parameter is LocalCoords then
the return value is in the coordinate system based in the interactors
current font. Otherwise it is returned in screen pixels. If the coords parameter is PixelCoords then
the coordinates are still relative to its parent, while the
ScreenCoords value will return realtive to the absolute
screen origin. Note that this gets the position of the exterior of the interactor,
including any decoration, eg title bars etc. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
If the coords parameter is LocalCoords then
the return value is in the coordinate system based in the interactors
current font. Otherwise it is returned in screen pixels. If the coords parameter is PixelCoords then
the coordinates are still relative to its parent, while the
ScreenCoords value will return realtive to the absolute
screen origin. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
If the coords parameter is LocalCoords then
the return value is in the coordinate system based in the interactors
current font. Otherwise it is returned in screen pixels. If the coords parameter is PixelCoords then
the coordinates are still relative to its parent, while the
ScreenCoords value will return realtive to the absolute
screen origin. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
Note that this sets the dimension of the interior of the interactor,
excluding any decoration, eg title bars etc. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height. The user should not override this function. If some form of action is
required on changing the interactors size then the
#_SetDimensions()# function should be overridden.
If the coords parameter is LocalCoords then
the return value is in the coordinate system based in the interactors
current font. Otherwise it is returned in screen pixels. If the coords parameter is PixelCoords then
the coordinates are still relative to its parent, while the
ScreenCoords value will return realtive to the absolute
screen origin. Note that this gets the dimension of the interior of the interactor,
excluding any decoration, eg title bars etc. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
If the coordinate system used is in pixels
(coords == ScreenCoords) then the position is in absolute
screen coordinates. Otherwise it uses the interactors own coordinate
system. This usually means negative values for the rectangles top left
corner. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
This function is used by the PInteractorCanvas class to determine
the drawing bounds for the canvas. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
For all AdjustBounds option, the bounds rectangle is
reduced by the size of the interactor just placed.
This option is used when both scroll bars are to be used and they must
be placed in the usual manner, with a small unused area in the bottom
right corner of the parent interactor.
This option is used when both scroll bars are to be used and they must
be placed in the usual manner, with a small unused area in the bottom
right corner of the parent interactor.
The point is usually in absolute screen coordinates, ie when
coords parameter is ScreenCoords, but may also
be relative to the interactors origin or scaled to the interactors font
based layout coordinates. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
The point is usually in absolute screen coordinates, ie when
coords parameter is ScreenCoords, but may also
be relative to the interactors origin or scaled to the interactors font
based layout coordinates. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
Note if an PInteractor is disabled, all its children, grandchildren etc
will be disabled.
This is identical to calling Enable(FALSE).
This enabled the interactor tree in post order, ie all children have
their ShowAll() function called and then the interactor itself is shown
using the Show() function.
This is identical to calling Show(FALSE).
If the interactor is a PTopLevelWindow then the "siblings" it
uses are other applications top level windows. This is equivalent to the
äctivating" of an application that the user may do using mouse and
keyboard in the platform dependent manner. Note that this does not change the order of child interactors as
returned by the \Ref{operator[]} function, only the screen
appearence is altered.
The parameterless form will invalidate the entire interactor. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height. The user should not override this function. If some form of action is
required on changing the interactors update region then the
_Invalidate() function should be overridden.
The parameterless form will validate the entire interactor. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height. The user should not override this function. If some form of action is
required on changing the interactors update region then the
_Validate() function should be overridden.
This will do a synchronous OnRedraw() call and guarantees that
the screen is updated before returning. It us used to speed up the
interaction with the user by not waiting for the standard delayed
screen update.
Note that the cursor grab is a system wide resource and must be
released by the application or it is possible to lock up the user
interface for all applications!
Note that the cursor grab is a system wide resource and must be
released by the application or it is possible to lock up the user
interface for all applications!
Appropriate messages are sent to interactors for the focus change. The
previous interactor receives a call to OnLostFocus() and the new
interactor receives a OnGainFocus() call.
Return: TRUE if has the current focus.
A call to this function will reset the cursor to parent flag that may
be set by the SetCursorToParent() function.
This does not change the current cursor as last set by the
SetCursor() function.
Note that subsequent calls to the SetAllCursors() and
SetWaitCursor() functions are ignored until the corresponding
RestoreAllCursors() function is called. That it these functions
may not be nested.
This function is equivalent to calling
SetAllCursors(PCursor(PSTD_ID_CURSOR_WAIT)).
The point is usually in absolute screen coordinates, ie when
coords parameter is ScreenCoords, but may also
be relative to the interactors origin or scaled to the interactors font
based layout coordinates. Note, this may not be available on all platforms in which case it does
nothing. For this and other reasons of user interfcace design, it is not
recommended that this function be used. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height. The user should not override this function. If some form of action is
required on changing the cursor position then the
_SetCursorPos() function should be overridden.
The point is usually in absolute screen coordinates, ie when
coords parameter is ScreenCoords, but may also
be relative to the interactors origin or scaled to the interactors font
based layout coordinates. When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
The text caret is a small rectangle used to indicate the current
position for editing text strings. It should only be present in
interactors that contain the current keyboard focus.
The text caret is a small rectangle used to indicate the current
position for editing text strings. It should only be present in
interactors that contain the current keyboard focus.
When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height. The user should not override this function. If some form of action is
required on changing the interactors caret position then the
_SetCaretPos() function should be overridden.
When scaling is used (coords == LocalCoords), the
coordinates used are 1/4 average font width and 1/8 the font height.
This will be the initial colour set in the PInteractorCanvas
instance created via a PDrawCanvas creation or via
OnRedraw() function call by the system providing a
PRedrawCanvas. On creation of the interator this is set to the colour specified by the
PApplication::GetWindowFgColour() function.
This will be the initial colour set in the PInteractorCanvas
instance created via a PDrawCanvas creation or via
OnRedraw() function call by the system providing a
PRedrawCanvas. On creation of the interator this is set to the colour specified by the
PApplication::GetWindowFgColour() function.
This will be the initial colour set in the PInteractorCanvas
instance created via a PDrawCanvas creation or via
OnRedraw() function call by the system providing a
PRedrawCanvas. On creation of the interator this is set to the colour specified by the
PApplication::GetWindowBkColour() function.
This will be the initial colour set in the PInteractorCanvas
instance created via a PDrawCanvas creation or via
OnRedraw() function call by the system providing a
PRedrawCanvas. On creation of the interator this is set to the colour specified by the
PApplication::GetWindowBkColour() function.
This may be one of several values depending on the type of the
interactor. For example a PTitledWindow would return a value as
in the PApplication::GetTitledBorderSize() function. If the interactor does not have a border then PDim(0,0) is
returned.
The actual colour returned is dependent on the type of interactor and
the current mode of the interactor. For instance for a
PTitledWindow that is active, the value returned would be as
specified by the PApplication::GetActiveBorderColour() function.
The first form will start to track a drag using the current interactor
as the OnMouseTrack() functions target object. The mouse pointer is automatically grabbed (via GrabMouse())
and released (via ReleaseMouse()). A canvas may also be
automatically created and deleted, and is provided to the
OnMouseTrack() function.
The two system parameters PApplication::GetDoubleClickRect() and
PApplication::GetDoubleClickTime() control what constitutes a
double click.
The key code passed in this function is a platform independent
representation of a key cap. No ASCII or ANSI translation is made. It may be assumed that the OnKeyDown() function occurs before the
OnKeyInput() function, but it should not be assumed
that the OnKeyUp() function occurs after OnKeyInput()
function.
virtual ~PInteractor()
Overrides from class PObject
virtual Comparison Compare( const PObject & obj ) const
New functions for class
PInteractor* GetParent() const
BOOL IsChild( PInteractor * parent ) const
PINDEX GetNumChildren()
PInteractor& operator[]( PINDEX index )
virtual void UpdateCommandSources()
virtual void SetFont( const PFont & newFont, BOOL toChildren = TRUE )
toChildren - Flag to recursively change all child interactors.const PRealFont& GetFont()
PDIMENSION ToPixelsDX( PDIMENSION x ) const
PDIMENSION ToPixelsDY( PDIMENSION y ) const
PORDINATE ToPixelsX( PORDINATE x ) const
PORDINATE ToPixelsY( PORDINATE y ) const
PDim ToPixels( const PDim & dim ) const
PPoint ToPixels( const PPoint & pt ) const
PRect ToPixels( const PRect & r ) const
PDIMENSION FromPixelsDX( PDIMENSION x ) const
PDIMENSION FromPixelsDY( PDIMENSION y ) const
PORDINATE FromPixelsX( PORDINATE x ) const
PORDINATE FromPixelsY( PORDINATE y ) const
PDim FromPixels( const PDim & dim ) const
PPoint FromPixels( const PPoint & pt ) const
PRect FromPixels( const PRect & r ) const
enum PositionOrigin
TopLeftScreen
CentreScreen
BottomRightScreen
TopLeftParent
CentreParent
BottomRightParent
TopLeftPixels
CentrePixels
BottomRightPixels
void SetPosition( PORDINATE x, PORDINATE y, PositionOrigin xOrigin = TopLeftParent, PositionOrigin yOrigin = TopLeftParent )
y - Vertical offset to apply to interactor.
xOrigin - Origin for horizontal offset.
yOrigin - Origin for verical offset.enum CoordinateSystem
LocalCoords
PixelCoords
PPoint GetPosition( CoordinateSystem coords ) const
PPoint ToScreen( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const
PPoint FromScreen( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const
void SetDimensions( PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
height - New height to apply to interactor.
coords - Coordinate system to use.PDim GetDimensions( CoordinateSystem coords ) const
PRect GetStructureBounds( CoordinateSystem coords ) const
virtual PRect GetDrawingBounds( CoordinateSystem coords ) const
enum AutoAdjustType
AdjustBounds
AdjustTop
AdjustBottom
AdjustLeft
AdjustRight
AdjustVScrollOnly
AdjustHScrollOnly
AdjustVScrollBeforeHScroll
AdjustHScrollAfterVScroll
void AutoAdjustBounds( PRect & bounds, AutoAdjustType type = AdjustBounds )
type - Option for adjustment to be made.BOOL ContainsPoint( const PPoint & pt, CoordinateSystem coords ) const
coords - Coordinate system to use.PInteractor* FindInteractor( const PPoint & pt, CoordinateSystem coords ) const
coords - Coordinate system to use.virtual void Enable( BOOL enabled = TRUE )
void Disable()
BOOL IsEnabled() const
virtual void ShowAll()
virtual void Show( BOOL visible = TRUE )
void Hide()
BOOL IsVisible() const
virtual void BringToTop()
virtual BOOL IsOnTop() const
void Invalidate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
y - Y position of the top left corner of the rectangle to invalidate.
width - Width of the rectangle to invalidate.
height - Height of the rectangle to invalidate.
coords - Coordinate system to use.void Validate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
y - Y position of the top left corner of the rectangle to validate.
width - Width of the rectangle to validate.
height - Height of the rectangle to validate.
coords - Coordinate system to use.void Update()
void GrabMouse()
void ReleaseMouse()
BOOL HasMouse() const
void GrabFocus()
BOOL HasFocus() const
virtual void SetCursor( const PCursor & newCursor )
PCursor GetCursor() const
void SetCursorToParent( BOOL useParent = TRUE )
void SetAllCursors( const PCursor & newCursor )
void RestoreAllCursors()
void SetWaitCursor()
void SetCursorPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
y - New Y position of cursor.
coords - Coordinate system to use.PPoint GetCursorPos( CoordinateSystem coords ) const
virtual void ShowCursor( BOOL show = TRUE )
void HideCursor()
void SetCaret( const PCaret & newCaret )
PCaret GetCaret() const
void SetCaretPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
y - New Y position of caret.
coords - Coordinate system to use.PPoint GetCaretPos( CoordinateSystem coords ) const
virtual void ShowCaret(BOOL show = TRUE)
void HideCaret()
virtual void SetForegroundColour( const PColour & newColour )
const PColour& GetForegroundColour() const
virtual void SetBackgroundColour( const PColour & newColour )
const PColour& GetBackgroundColour() const
PDim GetBorderSize() const
const PColour& GetBorderColour() const
PCanvas* StartMouseTrack( BOOL wantsCanvas = FALSE )
System callback functions.
virtual void OnMouseMove( PKeyCode button, const PPoint & where )
where - The position of the mouse pointer provided in pixels with its origin
at the top left of the interactor.
virtual void OnMouseDown( PKeyCode button, const PPoint & where, BOOL doubleClick )
where - The position of the mouse pointer provided in pixels with its origin
at the top left of the interactor.
doubleClick - Is TRUE if the mouse down is the second click of a double click.virtual void OnMouseUp( PKeyCode button, const PPoint & where )
where - The position of the mouse pointer provided in pixels with its origin
at the top left of the interactor.
virtual BOOL OnKeyDown( PKeyCode key, unsigned repeat )
repeat - Count for auto-repeat.