![]() |
Humble Framework for SkyOS |
#include <HApp.h>
Inheritance diagram for HApp:

Definition at line 48 of file HApp.h.
Public Member Functions | |
| ErrCode | Destroy (void) |
| Destroys the application window. | |
| ErrCode | Draw (HRect &rDirty) |
| Draws the client area of the main application window. | |
| virtual ErrCode | Init (int32 argc, TextPtr argv[]) |
| Initializes the application. | |
| virtual void | Kill (ErrCode ec) |
| Shuts down the application. | |
| int32 | Main (int32 argc, TextPtr argv[]) |
| Runs the application. | |
| bool | Quit (bool bForced=false) |
| Quits the application, causing the main message loop to exit. | |
| ErrCode | Show (void) const |
| Makes the application window visible. | |
| ErrCode | UpdateLayout (void) |
| Repositions all widgets within the main application window. | |
| virtual StringPtr | GetAppName (void) const |
| Returns the name of the application as a string. | |
| ErrCode | ExtractResource (StringPtr pstrSrc, StringPtr pstrDst=NULL) |
| Extracts a named resource to the file system. | |
Protected Member Functions | |
| END_MSG_MAP bool | onDestroy (const s_gi_msg &msg, HRESULT &hr) |
| Handler for the MSG_DESTROY message. | |
| virtual ErrCode | parseCmdLine (int32 argc, TextPtr argv[]) |
| Handles the parsing of the command line arguments. | |
Protected Attributes | |
| s_gi_msg | m_msgLast |
| Last message processed by app. | |
| HLayout | m_layout |
| The top-level layout manager. | |
| HMenuBar | m_menuBar |
| The application menu bar. | |
|
||||||||||||
|
Standard handler for the MSG_DESTROY message, which is called when the top-level window is destroyed, either by the user clicking in the "close box" or programmatically through a called to GI_destroy_window().
|
|
||||||||||||
|
Subclasses that want to process command line arguments should override this method.
|
|
|
Overrides the HWindow::Destroy() method because we actually destroy the parent window (frame?).
Reimplemented from HWidget. |
|
|
Draws the contents of the window by letting the top-level widget container (m_layout) handle all of the drawing.
Reimplemented from HWidget. |
|
||||||||||||
|
Performs all once-only startup processing, including the handling of any command-line arguments, prior to starting the main event loop. Subclasses that override this method MUST call this function prior to executing any startup code of their own:
HError MyApp::Init(int32 argc, TextPtr argv[]) { ErrCode ec = HError::NoError(); if ((ec = base_class::Init(argc, argv)) != NO_ERROR) return ec; // HError::GetLastError() has more info // // Custom initialization code goes here // return ec; }
|
|
|
Performs all once-only termination processing before the application exits. Since this function may be called when the application is in an unstable state, it should be as "lean and mean" as possible.
|
|
||||||||||||
|
This method is a replacement for the generic C/C++ main() function, and effectively runs the entire application. It first calls the HApp::Init() method to initialize everything, then enters the main event loop; once this loop exits, the HApp::Kill() method is invoked to clean up everything.
|
|
|
This method posts a WM_QUIT message to the application, causing the main message loop—in HApp::Main()—to exit. Returning a false value from this method indicates that the user wishes to cancel the quit action; of course, if the bForced parameter is true, this method will always return true.
|
|
|
Overrides the HWidget::Show() method to use GI_ShowApplicationWindow() instead of GI_show().
Reimplemented from HWidget. |
|
|
Reimplemented from HWindow< HApp >. |
|
|
This function should return the name of the application as a human-readable string, i.e., "SuperWidget v1.0". This string is used by the framework as the default title for windows and dialog boxes. All classes derived from HApp MUST implement this method
|
|
||||||||||||
|
|
2006.01.09-16:37