58 wxMenu* menu =
new wxMenu;
59 menu->Append(ID_SHOWGUI,_(
"&Show window"));
60 menu->AppendSeparator();
61 bool isRunning=wxGetApp().GetFrame()->IsRunning();
62 menu->Append(ID_START,_(
"Start batch"));
63 menu->Enable(ID_START,!isRunning);
64 if(wxGetApp().GetFrame()->IsPaused())
66 menu->Append(ID_PAUSE,_(
"Continue batch"));
70 menu->Append(ID_PAUSE,_(
"Pause batch"));
72 menu->Enable(ID_PAUSE,isRunning);
73 menu->Append(ID_STOP,_(
"Stop batch"));
74 menu->Enable(ID_STOP,isRunning);
75 menu->AppendSeparator();
76 menu->Append(ID_ADDPROJECT,_(
"Add project to stitching queue..."));
77 menu->Append(ID_ADDPROJECTASSISTANT,_(
"Add project to assistant queue..."));
80 menu->AppendSeparator();
81 menu->Append(ID_EXIT, _(
"E&xit"));
88 wxGetApp().GetFrame()->Show(
true);
89 wxGetApp().GetFrame()->Iconize(
false);
90 wxGetApp().GetFrame()->UpdateBatchVerboseStatus();
95 wxCommandEvent ev(wxEVT_COMMAND_TOOL_CLICKED ,XRCID(
"tool_start"));
96 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
101 wxCommandEvent ev(wxEVT_COMMAND_TOOL_CLICKED ,XRCID(
"tool_pause"));
102 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
107 wxCommandEvent ev(wxEVT_COMMAND_TOOL_CLICKED ,XRCID(
"tool_cancel"));
108 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
113 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED ,XRCID(
"menu_add"));
114 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
119 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED ,XRCID(
"menu_add_assistant"));
120 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
125 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED ,XRCID(
"menu_exit"));
126 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
131 wxCommandEvent dummy;
135 #if defined __WXMSW__ && wxUSE_TASKBARICON_BALLOONS
151 : wxFrame(NULL,-1,wxT("no title"),wxDefaultPosition,wxDefaultSize,wxNO_BORDER | wxSTAY_ON_TOP | wxFRAME_SHAPED | wxFRAME_NO_TASKBAR)
153 SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
154 wxBoxSizer* mainSizer =
new wxBoxSizer(wxVERTICAL);
156 wxStaticText* title =
new wxStaticText(
this, -1, sTitle);
157 wxFont titleFont = GetFont();
158 titleFont.SetWeight(wxFONTWEIGHT_BOLD);
159 title->SetFont(titleFont);
160 title->SetBackgroundColour(GetBackgroundColour());
161 mainSizer->Add(title,0,wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5);
162 wxStaticText* text =
new wxStaticText(
this, -1, sMessage);
163 text->SetBackgroundColour(GetBackgroundColour());
164 mainSizer->Add(text,1,wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5);
166 mainSizer->SetSizeHints(
this );
168 m_timer =
new wxTimer(
this,TIMER_BALLOON);
172 GetPosition( &iX, &iY );
204 m_timer->Start(iTimeout,wxTIMER_ONE_SHOT);
void OnLeftButtonDClick(wxTaskBarIconEvent &)
handler if double clicked on taskbar icon, opens window
void OnStopBatch(wxCommandEvent &e)
handler to stop batch
void OnKeyDown(wxKeyEvent &e)
key down event in the balloon
class to show a taskbar balloon
void OnShowGUI(wxCommandEvent &e)
handler to open window
Batch processor for Hugin with GUI.
definition of tray/task bar icon for PTBatcherGUI
void OnPauseBatch(wxCommandEvent &e)
handler to pause batch
void OnStartBatch(wxCommandEvent &e)
handler to start batch
class for showing a taskbar/tray icon
virtual ~TaskBarBalloon()
void OnAddProject(wxCommandEvent &e)
handler to adding a project to stitching queue
void OnAddProjectToAssistant(wxCommandEvent &e)
handler to adding a project to assistant queue
void showBalloon(unsigned int iTimeout)
display the baloon and run the timer
void OnTimerTick(wxTimerEvent &e)
timer to close window
void OnExit(wxCommandEvent &e)
handler to exit PTBatcherGUI
void OnClick(wxMouseEvent &e)
click on the balloon