Index: A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
ShellAppBase is the base class for any Environment Shell application in the system.
#include <shell/shellapp.h>
public: | |
~ShellAppBase(); | |
static MessageQueue * | GetEnvironmentShellQueue(void); |
void | ProcessUnhandledKeyEvent(KeyEvent& keyEvent); |
protected: |
public: | ||
---|---|---|
// FlexComponent members | ||
enum | HorizontalSizePreference; | |
enum | VerticalSizePreference; | |
Result | AddComponentListener(ComponentListenerInterface& listener); | |
Result | AddFocusListener(FocusListenerInterface& listener); | |
Result | AddKeyListener(KeyListenerInterface& listener); | |
Result | AddMouseListener(MouseListenerInterface& listener); | |
Result | AddMouseMotionListener(MouseMotionListenerInterface& listener); | |
void | AddNotify(void); | |
Boolean | Contains(WinCoord x, WinCoord y); | |
Boolean | Contains(WinXYPoint& point); | |
void | DelayedDelete(void); | |
void | DoLayout(void); | |
Colorant | GetBackground(void); | |
WinRectangle | GetBounds(void) const; | |
FlexComponent * | GetComponentAt(WinCoord x, WinCoord y, Boolean visibleOnly ); | |
FlexComponent * | GetComponentAt(WinXYPoint& point, Boolean visibleOnly ); | |
Colorant | GetForeground(void); | |
FlexComponentID | GetID(void); | |
WinXYPoint | GetLocation(void); | |
Dimension | GetMinimumSize(void); | |
FlexContainer * | GetParent(void) const; | |
FlexWindow * | GetFlexWindowAncestor(void); | |
Dimension | GetPreferredSize(void); | |
Dimension | GetSize(void) const; | |
void | GetSizePreference(HorizontalSizePreference &horizontalSizePref, VerticalSizePreference &verticalSizePref); | |
void | Invalidate(void); | |
Boolean | IsEnabled(void) const; | |
Boolean | IsFocusTraversable(void); | |
Boolean | IsShowing(void) const; | |
Boolean | IsGeometryValid(void) const; | |
Boolean | IsVisible(void) const; | |
void | Paint(void); | |
void | RemoveComponentListener(ComponentListenerInterface& listener); | |
void | RemoveFocusListener(FocusListenerInterface& listener); | |
void | RemoveKeyListener(KeyListenerInterface& listener); | |
void | RemoveMouseListener(MouseListenerInterface& listener); | |
void | RemoveMouseMotionListener(MouseMotionListenerInterface& listener); | |
void | RemoveNotify(void); | |
void | Repaint(void); | |
void | Repaint(WinCoord x, WinCoord y, uint16 width, uint16 height); | |
void | RequestFocus(void); | |
Result | SetBackground(Colorant color); | |
void | SetBounds(WinCoord x, WinCoord y, uint16 width, uint16 height); | |
void | SetBounds(WinRectangle& rect); | |
void | SetEnabled(Boolean enable); | |
Result | SetForeground(Colorant color); | |
void | SetID(FlexComponentID id); | |
void | SetLocation(WinCoord x, WinCoord y); | |
void | SetLocation(const WinXYPoint& point); | |
void | SetSize(const Dimension& dimension); | |
void | SetSize(uint16 width, uint16 height); | |
void | SetSizePreference(HorizontalSizePreference horizontalSizePref, VerticalSizePreference verticalSizePref); | |
Result | SetVisible(Boolean visible); | |
void | TransferFocus(void); | |
void | Update(WinCoord x, WinCoord y, uint16 width, uint16 height); | |
void | Validate(void); | |
// Event processing methods | ||
void | ProcessActionEvent(ActionEvent& actionEvent); | |
void | ProcessComponentEvent(ComponentEvent& componentEvent); | |
void | ProcessFocusEvent(FocusEvent& focusEvent); | |
void | ProcessKeyEvent(KeyEvent& keyEvent); | |
void | ProcessMouseEvent(MouseEvent& mouseEvent); | |
void | ProcessMouseMotionEvent(MouseEvent& mouseEvent); | |
// Graphical rendering methods | ||
void * | CopyArea(const WinRectangle *bounds) const; | |
WinCoord | FontMetric( FontMetricInfo info, const TextState& textState ) const; | |
void | BrushLine( WinXYPoint p1, WinXYPoint p2, Colorant lineCOlor, WinCoord penWidth ); | |
void | DrawLine( WinXYPoint p1, WinXYPoint p2, Colorant lineColor ); | |
void | DrawHLine( WinCoord xStart, WinCoord xEnd, WinCoord yCoord, Colorant lineColor ); | |
void | DrawVLine( WinCoord xCoord, WinCoord yStart, WinCoord yEnd, Colorant lineColor); | |
void | DrawBitmap(const Bitmap& bitmap, WinXYPoint destUpLeft, Colorant color); | |
void | DrawBitmap(const Bitmap& bitmap, WinXYPoint destUpLeft); | |
void | DrawPoint( WinCoord xPos, WinCoord yPos, Colorant dotColor ); | |
void | DrawPoint( WinXYPoint point, Colorant dotColor ); | |
void | DrawString( const TCHAR string[], TextState& textState ); | |
void | DrawString( const TCHAR string[], int32 numChars, TextState& textState ); | |
void | DrawUIShape( const UIShape srcUIShape, const WinXYPoint& basePoint, Colorant fgColor, int16 parm0 , int16 parm1 , int16 parm2 , int16 parm3 ); | |
void | InvertUIShape( const UIShape srcUIShape, const WinXYPoint& basePoint, int16 parm0 , int16 parm1 , int16 parm2 , int16 parm3 ); | |
void | FillRect( WinCoord leftCorner, WinCoord topCorner, WinCoord rightCorner, WinCoord bottomCorner, Colorant fillColor ); | |
void | InvertRect( WinCoord leftCorner, WinCoord topCorner, WinCoord rightCorner, WinCoord bottomCorner ); | |
void | InvertLine( WinXYPoint p1, WinXYPoint p2 ); | |
void | InvertLine( WinCoord x1, WinCoord y1, WinCoord x2, WinCoord y2 ); | |
void | SetClipRect( const WinXYPoint& clipUpLeft, const WinXYPoint& clipLowRight ); | |
void | ClearClipRect(void); | |
void | Render(Renderer& renderer); | |
WinCoord | StringWidth( const TCHAR string[], const TextState& textState ) const; | |
WinCoord | StringWidth( const TCHAR string[], int32 numChars, const TextState& textState ) const; | |
// FlexContainer members | ||
Result | Add(FlexComponent *child); | |
Result | Add(FlexComponent *child, uint32 position); | |
Result | Add(LayoutTagType tag, FlexComponent *child); | |
Result | AddContainerListener(ContainerListenerInterface& listener); | |
uint32 | FindFlexComponent(FlexComponent *child); | |
FlexComponent * | GetFlexComponent(uint32 position); | |
FlexComponent * | GetFlexComponent(uint32 position, LayoutTagType& tag); | |
uint32 | GetFlexComponentCount(void); | |
FlexComponent** | GetFlexComponents(void); | |
FocusManagerInterface * | GetFocusManager(void); | |
LayoutManagerInterface * | GetLayout(void); | |
LayoutTagType | GetLayoutTag(uint32 position); | |
Insets | GetInsets(void); | |
Result | GetRelativeBounds(FlexComponent *descendant, WinRectangle &bounds); | |
Result | GetRelativeLocation(FlexComponent *descendant, WinXYPoint point, WinXYPoint &location); | |
Boolean | IsAncestorOf(FlexComponent *child); | |
FlexComponent * | Remove(FlexComponent *child); | |
FlexComponent * | Remove(uint32 position); | |
void | RemoveAll(void); | |
void | RemoveContainerListener(ContainerListenerInterface& listener); | |
FocusManagerInterface * | RemoveFocusManager(void); | |
LayoutManagerInterface * | RemoveLayout(void); | |
void | SetFocusManager(FocusManagerInterface *focusManager); | |
void | SetLayout(LayoutManagerInterface *layoutManager); | |
void | SetLayoutTag(LayoutTagType tag, uint32 position); | |
// Event processing methods | ||
void | ProcessContainerEvent(ContainerEvent& containerEvent); | |
enum | AppState; | |
Result | AddFocusChangeListener(FocusChangeListenerInterface& listener); | |
Result | AddInkListener(InkListenerInterface& listener); | |
Result | AddTargetChangeListener(TargetChangeListenerInterface& listener); | |
Result | AddWindowListener(WindowListenerInterface& listener); | |
void | Exit(void); | |
static Result | FlushInput(void); | |
static AppBase * | GetAppBase(void); | |
TCHAR * | GetAppContext(void); | |
uint32 | GetDesiredStackSize(void) const; | |
static FlexComponent * | GetFocus(void); | |
AppState | GetState(void) const; | |
Thread * | GetThread(void) const; | |
static FlexComponent * | GetTarget(void); | |
const TCHAR * | GetUAL(void) const; | |
Boolean | HandleUndispatchedMessage(Message *msg); | |
void | Idle(void); | |
void | Lower(void); | |
void | ProcessFocusChangeEvent(FocusChangeEvent& e); | |
void | ProcessInkEvent(InkEvent& e); | |
void | ProcessTargetChangeEvent(TargetChangeEvent& e); | |
void | ProcessWindowEvent(WindowEvent &e); | |
void | Raise(void); | |
void | RemoveFocusChangeListener(FocusChangeListenerInterface& listener); | |
void | RemoveInkListener(InkListenerInterface& listener); | |
void | RemoveTargetChangeListener(TargetChangeListenerInterface& listener); | |
void | RemoveWindowListener(WindowListenerInterface& listener); | |
void | SetAppContext(const TCHAR *context) ; | // pure virtual |
static FlexComponent * | SetFocus(FlexComponent *focusObj); | |
void | SetState(AppState state); | |
static FlexComponent * | SetTarget(FlexComponent *targetObj); | |
static Result | UpdateDisplay(void); | |
protected: | ||
EC (static void EnsureInAppThread(void)); |
Back to the top of ShellAppBase
Back to the top of ShellAppBase
Back to the top of ShellAppBase
OVERVIEW
ShellAppBase is the base class for the Environment Shell application.
It provides useful default functionality (such as changing the window
priority to keep the EnvShell application on top), as well as extra
API that the system uses to communicate with the application.
Back to the top of ShellAppBase
Destructor for the ShellAppBase class.
Overrides: Default AppBase destructor
Prototype:
~ShellAppBase();
Back to the top of ShellAppBase
MessageQueue *GetEnvironmentShellQueue(void);
Returns the MessageQueue associated with the Environment Shell thread.
Return value: A pointer to a MessageQueue, or NULL if the Environment Shell thread hasn't been started yet.
Prototype:
static MessageQueue *GetEnvironmentShellQueue(void);
Back to the top of ShellAppBase
void ProcessUnhandledKeyEvent(KeyEvent& keyEvent);
ProcessUnhandledKeyEvent is invoked when the user presses a key that is not consumed by any of the objects in the active application. The application forwards unused keys to the Environment Shell application, and this member function is invoked to enable the Environment Shell to perform any device-specific handling.
There is the potential for odd race conditions if the user is typing and switching applications simultaneously, as the key events would be processed by different applications running on different threads and so might be forwarded to the Environment Shell in a different order than that in which they were generated. This situation should be rather rare, however, and presumably would have minimal impact.
Parameters:
Prototype:
virtual void ProcessUnhandledKeyEvent(KeyEvent& keyEvent);
Back to the top of ShellAppBase