| 1 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 2 | // Name: aeinstallerapp.cpp
|
|---|
| 3 | // Purpose:
|
|---|
| 4 | // Author:
|
|---|
| 5 | // Modified by:
|
|---|
| 6 | // Created: 07/05/2009 17:23:39
|
|---|
| 7 | // RCS-ID:
|
|---|
| 8 | // Copyright:
|
|---|
| 9 | // Licence:
|
|---|
| 10 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 11 |
|
|---|
| 12 | // For compilers that support precompilation, includes "wx/wx.h".
|
|---|
| 13 | #include "wx/wxprec.h"
|
|---|
| 14 |
|
|---|
| 15 | #ifdef __BORLANDC__
|
|---|
| 16 | #pragma hdrstop
|
|---|
| 17 | #endif
|
|---|
| 18 |
|
|---|
| 19 | #ifndef WX_PRECOMP
|
|---|
| 20 | #include "wx/wx.h"
|
|---|
| 21 | #endif
|
|---|
| 22 |
|
|---|
| 23 | ////@begin includes
|
|---|
| 24 | ////@end includes
|
|---|
| 25 |
|
|---|
| 26 | #include "main.h"
|
|---|
| 27 | #include <string>
|
|---|
| 28 |
|
|---|
| 29 | ////@begin XPM images
|
|---|
| 30 | ////@end XPM images
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | /*
|
|---|
| 34 | * Application instance implementation
|
|---|
| 35 | */
|
|---|
| 36 |
|
|---|
| 37 | ////@begin implement app
|
|---|
| 38 | IMPLEMENT_APP( AEInstallerApp )
|
|---|
| 39 | ////@end implement app
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | /*
|
|---|
| 43 | * AEInstallerApp type definition
|
|---|
| 44 | */
|
|---|
| 45 |
|
|---|
| 46 | IMPLEMENT_CLASS( AEInstallerApp, wxApp )
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | /*
|
|---|
| 50 | * AEInstallerApp event table definition
|
|---|
| 51 | */
|
|---|
| 52 |
|
|---|
| 53 | BEGIN_EVENT_TABLE( AEInstallerApp, wxApp )
|
|---|
| 54 |
|
|---|
| 55 | ////@begin AEInstallerApp event table entries
|
|---|
| 56 | ////@end AEInstallerApp event table entries
|
|---|
| 57 |
|
|---|
| 58 | END_EVENT_TABLE()
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | /*
|
|---|
| 62 | * Constructor for AEInstallerApp
|
|---|
| 63 | */
|
|---|
| 64 |
|
|---|
| 65 | AEInstallerApp::AEInstallerApp()
|
|---|
| 66 | {
|
|---|
| 67 | Init();
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | /*
|
|---|
| 72 | * Member initialisation
|
|---|
| 73 | */
|
|---|
| 74 |
|
|---|
| 75 | void AEInstallerApp::Init()
|
|---|
| 76 | {
|
|---|
| 77 | ////@begin AEInstallerApp member initialisation
|
|---|
| 78 | ////@end AEInstallerApp member initialisation
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | /*
|
|---|
| 82 | * Initialisation for AEInstallerApp
|
|---|
| 83 | */
|
|---|
| 84 | MainWindow* TheWindow;
|
|---|
| 85 | bool AEInstallerApp::OnInit()
|
|---|
| 86 | {
|
|---|
| 87 | ////@begin AEInstallerApp initialisation
|
|---|
| 88 | // Remove the comment markers above and below this block
|
|---|
| 89 | // to make permanent changes to the code.
|
|---|
| 90 |
|
|---|
| 91 | #if wxUSE_XPM
|
|---|
| 92 | wxImage::AddHandler(new wxXPMHandler);
|
|---|
| 93 | #endif
|
|---|
| 94 | #if wxUSE_LIBPNG
|
|---|
| 95 | wxImage::AddHandler(new wxPNGHandler);
|
|---|
| 96 | #endif
|
|---|
| 97 | #if wxUSE_LIBJPEG
|
|---|
| 98 | wxImage::AddHandler(new wxJPEGHandler);
|
|---|
| 99 | #endif
|
|---|
| 100 | #if wxUSE_GIF
|
|---|
| 101 | wxImage::AddHandler(new wxGIFHandler);
|
|---|
| 102 | #endif
|
|---|
| 103 | MainWindow* mainWindow = new MainWindow( NULL );
|
|---|
| 104 | mainWindow->Show(true);
|
|---|
| 105 | ////@end AEInstallerApp initialisation
|
|---|
| 106 | TheWindow = mainWindow;
|
|---|
| 107 |
|
|---|
| 108 | return true;
|
|---|
| 109 | }
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 | void setStatusArea( string s ) {
|
|---|
| 113 | wxString wxs(s.c_str(), wxConvUTF8);
|
|---|
| 114 |
|
|---|
| 115 | TheWindow->StatusArea->SetStatusText( wxs );
|
|---|
| 116 | //TheWindow->StatusArea->SetStatusText(s.c_str());
|
|---|
| 117 | //StatusArea->SetStatusText(_(s.c_str()));
|
|---|
| 118 | //(*TheStatusBar)->SetStatusText(_(s.c_str()));
|
|---|
| 119 | //AEInstallerApp::
|
|---|
| 120 | // TheWindow->StatusArea->SetStatusText("hi");
|
|---|
| 121 | //mainWindow
|
|---|
| 122 | //itemFrame1->StatusArea->SetStatusText(_"lol");
|
|---|
| 123 | //MainWindow.StatusArea->SetStatusText("hi");
|
|---|
| 124 | // class AbstractStatusNotifier { public: virtual void NotifyStatus(const wxString &statusString) = 0; };
|
|---|
| 125 | //class StatusBarStatusNotifier : public AbstractStatusNotifier { wxStatusBar *statusbar; StatusBarStatusNotifier(wxStatusBar *bar) : statusbar(bar) { } ;
|
|---|
| 126 | //void NotifyStatus(const wxString &status) { statusbar->SetStatus(status); } }
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 | //MainWindow::StatusArea->
|
|---|
| 130 | //MainWindow::MainWindow().SetSize(MainWindow::MainWindow().GetRect().GetWidth(), MainWindow::MainWindow().GetRect().GetHeight()+1);
|
|---|
| 131 |
|
|---|
| 132 | //MainWindow::StatusBar->SetLabel("Importing Files...");
|
|---|
| 133 | //StatusBar->SetLabel(s);
|
|---|
| 134 | //->SetLabel(s);
|
|---|
| 135 |
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 | /*
|
|---|
| 140 | * Cleanup for AEInstallerApp
|
|---|
| 141 | */
|
|---|
| 142 |
|
|---|
| 143 | int AEInstallerApp::OnExit()
|
|---|
| 144 | {
|
|---|
| 145 | ////@begin AEInstallerApp cleanup
|
|---|
| 146 | return wxApp::OnExit();
|
|---|
| 147 | ////@end AEInstallerApp cleanup
|
|---|
| 148 | }
|
|---|
| 149 |
|
|---|