home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * POPPAD.CXX
- * (c) 1992 STAR DIVISION
- *******************************************************************/
-
- #include <sv.hxx>
-
- // --- class MyApp -------------------------------------------------
-
- class MyApp : public Application
- {
- public:
- virtual void Main( int, char*[] );
- };
-
- // --- class EditWindow --------------------------------------------
-
- class EditWindow : public WorkWindow
- {
- protected:
- MultiLineEdit aEditor;
-
- public:
- EditWindow();
-
- virtual void Resize();
- virtual void GetFocus();
- };
-
- // --- EditWindow::EditWindow() ------------------------------------
-
- EditWindow::EditWindow() :
- WorkWindow( NULL, WB_APP | WB_STDWORK ),
- aEditor( this, WB_HSCROLL | WB_VSCROLL | WB_LEFT )
- {
- aEditor.ChangePosPixel( Point( 0, 0 ) );
- aEditor.ChangeSizePixel( GetOutputSizePixel() );
- aEditor.Show();
-
- SetText( "PopPad" );
- Show();
- }
-
- // --- EditWindow::GetFocus() --------------------------------------
-
- void EditWindow::GetFocus()
- {
- aEditor.GrabFocus();
- }
-
- // --- EditWindow::Resize() ----------------------------------------
-
- void EditWindow::Resize()
- {
- aEditor.ChangeSizePixel( GetOutputSizePixel() );
- }
-
- // --- MyApp::Main() -----------------------------------------------
-
- void MyApp::Main( int, char*[] )
- {
- EditWindow aWindow;
- Execute();
- }
-
- // --- aMyApp ------------------------------------------------------
-
- MyApp aMyApp;
-
- #ifdef MAC
- Application* pApp = &aMyApp;
- #endif
-