Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
MyApp Class Reference

#include <wxProfileDump.h>

+ Inheritance diagram for MyApp:
+ Collaboration diagram for MyApp:

Public Member Functions

int OnExit ()
 
bool OnInit ()
 

Public Attributes

wxFileHistory m_history
 

Detailed Description

Definition at line 71 of file wxProfileDump.h.

Member Function Documentation

◆ OnExit()

int MyApp::OnExit ( )

Definition at line 237 of file wxProfileDump.cpp.

238{
239 wxConfig config;
240
241 m_history.Save(config);
242
243 return 0;
244}
wxFileHistory m_history

References m_history.

◆ OnInit()

bool MyApp::OnInit ( )

Definition at line 172 of file wxProfileDump.cpp.

173{
174 // Create the main frame window
175 my_frame = new MyFrame((wxFrame *)NULL, wxID_ANY, _T("ProfileDump"),
176 wxDefaultPosition, wxSize(1024, 768),
177 wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL);
178
179 // using wxConfig instead of writing wxFileConfig or wxRegConfig enhances
180 // portability of the code
181 wxConfig config(wxT("wxProfileDump"));
182
183 m_history.Load(config);
184
185#ifdef __WXMSW__
186#if 0
187 // Experimental: change the window menu
188 wxMenu* windowMenu = new wxMenu;
189 windowMenu->Append(5000, _T("My menu item!"));
190 my_frame->SetWindowMenu(windowMenu);
191#endif
192#endif
193
194 // Give it an icon
195#ifdef __WXMSW__
196 my_frame->SetIcon(wxIcon(_T("wxProfileDump_icn")));
197#else
198 //my_frame->SetIcon(wxIcon( wxProfileDump_xpm ));
199#endif
200
201 // Make a menubar
202 wxMenu *file_menu = new wxMenu;
203
204 file_menu->Append(MDI_OPEN_PROFILE, _T("&Open Profile\tCtrl-O"), _T("Open an ICC profile"));
205 file_menu->Append(MDI_QUIT, _T("&Exit\tAlt-X"), _T("Quit the program"));
206
207 m_history.UseMenu(file_menu);
208 m_history.AddFilesToMenu(file_menu);
209
210 wxMenu *help_menu = new wxMenu;
211 help_menu->Append(MDI_ABOUT, _T("&About\tF1"));
212
213 wxMenuBar *menu_bar = new wxMenuBar;
214
215 menu_bar->Append(file_menu, _T("&File"));
216 menu_bar->Append(help_menu, _T("&Help"));
217
218 // Associate the menu bar with the frame
219 my_frame->SetMenuBar(menu_bar);
220
221#if wxUSE_STATUSBAR
222 my_frame->CreateStatusBar();
223#endif // wxUSE_STATUSBAR
224
225 my_frame->Show(true);
226 my_frame->SetDropTarget(new MyDnDFile(my_frame));
227
228 SetTopWindow(my_frame);
229
230 if (argc>1) {
231 my_frame->OpenFile(argv[1]);
232 }
233
234 return true;
235}
void OpenFile(wxString path)
#define wxT(x)
MyFrame * my_frame
@ MDI_ABOUT
@ MDI_QUIT
@ MDI_OPEN_PROFILE

References MDI_ABOUT, MDI_OPEN_PROFILE, MDI_QUIT, my_frame, MyFrame::OpenFile(), and wxT.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_history

wxFileHistory MyApp::m_history

Definition at line 77 of file wxProfileDump.h.

Referenced by OnExit().


The documentation for this class was generated from the following files: