59 wxMenu* menu =
new wxMenu;
61 menu->AppendSeparator();
62 bool isRunning=wxGetApp().GetFrame()->IsRunning();
63 menu->Append(
ID_START,_(
"Start batch"));
65 if(wxGetApp().GetFrame()->IsPaused())
67 menu->Append(
ID_PAUSE,_(
"Continue batch"));
71 menu->Append(
ID_PAUSE,_(
"Pause batch"));
74 menu->Append(
ID_STOP,_(
"Stop batch"));
75 menu->Enable(
ID_STOP,isRunning);
76 menu->AppendSeparator();
77 menu->Append(
ID_ADDPROJECT,_(
"Add project to stitching queue..."));
81 menu->AppendSeparator();
82 menu->Append(
ID_EXIT, _(
"E&xit"));
89 wxGetApp().GetFrame()->Show(
true);
90 wxGetApp().GetFrame()->Iconize(
false);
91 wxGetApp().GetFrame()->UpdateBatchVerboseStatus();
96 wxCommandEvent ev(wxEVT_COMMAND_TOOL_CLICKED ,XRCID(
"tool_start"));
97 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
102 wxCommandEvent ev(wxEVT_COMMAND_TOOL_CLICKED ,XRCID(
"tool_pause"));
103 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
108 wxCommandEvent ev(wxEVT_COMMAND_TOOL_CLICKED ,XRCID(
"tool_cancel"));
109 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
114 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED ,XRCID(
"menu_add"));
115 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
120 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED ,XRCID(
"menu_add_assistant"));
121 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
126 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED ,XRCID(
"menu_exit"));
127 wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(ev);
132 wxCommandEvent dummy;
136 #if defined __WXMSW__ && wxUSE_TASKBARICON_BALLOONS
147 : wxFrame(NULL,-1,wxT(
"no title"),wxDefaultPosition,wxDefaultSize,wxNO_BORDER | wxSTAY_ON_TOP | wxFRAME_SHAPED | wxFRAME_NO_TASKBAR)
149 SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
150 wxBoxSizer* mainSizer =
new wxBoxSizer(wxVERTICAL);
152 wxStaticText* title =
new wxStaticText(
this, -1, sTitle);
153 wxFont titleFont = GetFont();
154 titleFont.SetWeight(wxFONTWEIGHT_BOLD);
155 title->SetFont(titleFont);
156 title->SetBackgroundColour(GetBackgroundColour());
157 mainSizer->Add(title,0,wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5);
158 wxStaticText* text =
new wxStaticText(
this, -1, sMessage);
159 text->SetBackgroundColour(GetBackgroundColour());
160 mainSizer->Add(text,1,wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5);
162 mainSizer->SetSizeHints(
this );
168 GetPosition( &iX, &iY );
203 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
TaskBarBalloon(wxString sTitle, wxString sMessage)
void OnKeyDown(wxKeyEvent &e)
key down event in the balloon
BatchTaskBarIcon(wxTaskBarIconType iconType=wxTBI_DEFAULT_TYPE)
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
virtual wxMenu * CreatePopupMenu()
creates the popup menu
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