32 #if defined(G4UI_BUILD_WT_SESSION) || defined(G4UI_USE_WT)
41 #include <Wt/WPushButton>
43 #include <Wt/WTreeNode>
45 #include <Wt/WTabWidget>
46 #include <Wt/WStringListModel>
72 class G4WTabWidget :
public Wt::WTabWidget {
75 G4WTabWidget(Wt::WContainerWidget*&);
76 inline void setTabSelected(
bool a) { tabSelected =
a; };
77 inline void setLastTabCreated(
int a) { lastCreated =
a; };
78 inline bool isTabSelected() {
return tabSelected; };
93 void AddMenu(
const char*,
const char*);
98 void AddButton(
const char*,
const char*,
const char*);
104 void AddIcon(
const char* userLabel,
const char* iconFile,
const char* command,
const char* file_name=
"");
112 bool AddTabWidget( Wt::WWidget*, Wt::WString,
int,
int);
115 Wt::WTabWidget* GetSceneTreeComponentsTBWidget();
118 bool IsSplitterReleased();
120 inline bool IsIconMoveSelected() {
121 return fMoveSelected;
123 inline bool IsIconRotateSelected() {
124 return fRotateSelected;
126 inline bool IsIconPickSelected() {
127 return fPickSelected;
129 inline bool IsIconZoomInSelected() {
130 return fZoomInSelected;
132 inline bool IsIconZoomOutSelected() {
133 return fZoomOutSelected;
149 inline Wt::WContainerWidget * GetMainWindow() {
156 void SessionTerminate();
164 void CreateHelpWidget();
165 void InitHelpTreeAndVisParametersWidget();
170 Wt::WTreeNode* FindTreeItem( Wt::WTreeNode *,
const std::string&);
175 bool eventFilter(Wt::WObject*,Wt::WEvent*);
179 Wt::WContainerWidget* CreateVisParametersTBWidget();
180 Wt::WWidget* CreateHelpTBWidget();
181 Wt::WWidget* CreateCoutTBWidget();
182 Wt::WWidget* CreateHistoryTBWidget();
183 Wt::WWidget* CreateUITabWidget();
184 Wt::WWidget* CreateSceneTreeComponentsTBWidget();
185 Wt::WContainerWidget* CreateRightSplitterWidget();
186 Wt::WContainerWidget* CreateLeftSplitterWidget();
187 void OpenHelpTreeOnCommand(
const Wt::WString &);
188 Wt::WString GetShortCommandPath(
const std::string & );
189 Wt::WString GetLongCommandPath( Wt::WTreeNode*);
191 bool CreateVisCommandGroupAndToolBox(
G4UIcommand*, Wt::WWidget*,
int,
bool isDialog);
192 bool CreateCommandWidget(
G4UIcommand* command, Wt::WContainerWidget* parent,
bool isDialog);
196 Wt::WContainerWidget * fMainWindow;
197 Wt::WLabel *fCommandLabel;
198 Wt::WLineEdit * fCommandArea;
199 Wt::WTextArea *fCoutTBTextArea;
200 Wt::WTextArea *fHelpArea;
201 Wt::WTabWidget* fUITabWidget;
202 Wt::WStringListModel fG4cout;
203 Wt::WLineEdit * fCoutFilter;
205 Wt::WSelectionBox *fHistoryTBTableList;
206 Wt::WTree *fHelpTreeWidget;
207 Wt::WPanel* fHelpTBWidget;
208 Wt::WPanel* fHistoryTBWidget;
209 Wt::WPanel* fCoutTBWidget;
210 Wt::WTabWidget* fSceneTreeComponentsTBWidget;
211 Wt::WLineEdit* fHelpLine;
212 G4WTabWidget* fViewerTabWidget;
213 Wt::WString fCoutText;
214 Wt::WLabel *fEmptyViewerTabLabel;
215 Wt::WContainerWidget* fMainSplitterWidget;
216 Wt::WContainerWidget* fRightSplitterWidget;
217 Wt::WContainerWidget* fLeftSplitterWidget;
218 Wt::WContainerWidget* fHelpVSplitter;
220 Wt::WToolBar *fToolbarApp;
221 Wt::WToolBar *fToolbarUser;
222 Wt::WString fStringSeparator;
224 Wt::WString fLastOpenPath;
227 bool fRotateSelected;
229 bool fZoomInSelected;
230 bool fZoomOutSelected;
237 void ClearButtonCallback();
238 void CommandEnteredCallback();
239 void CommandEditedCallback(
const Wt::WString & text);
240 void ButtonCallback(
const char*);
241 void HelpTreeClicCallback();
242 void HelpTreeDoubleClicCallback();
243 void ShowHelpCallback();
244 void CommandHistoryCallback();
245 void LookForHelpStringCallback();
246 void CurrentChangedTabWidgetCallback(
int);
247 void CoutFilterCallback(
const Wt::WString&);
248 void TabCloseCallback(
int);
249 void ToolBoxActivated(
int);
250 void VisParameterCallback(Wt::WContainerWidget*);
251 void ChangeColorCallback(Wt::WContainerWidget*);
252 void ChangeCursorStyle(
const Wt::WString&);
253 void ChangeSurfaceStyle(
const Wt::WString&);
254 void OpenIconCallback(
const Wt::WString&);
255 void SaveIconCallback(
const Wt::WString&);
256 void ChangePerspectiveOrthoCallback(
const Wt::WString&);
std::vector< ExP01TrackerHit * > a
virtual void PauseSessionStart(const G4String &Prompt)=0
virtual void ExitHelp() const =0
virtual G4int ReceiveG4cout(const G4String &coutString)
virtual G4int ReceiveG4cerr(const G4String &cerrString)
virtual G4UIsession * SessionStart()=0
virtual G4bool GetHelpChoice(G4int &)=0
virtual void AddButton(const char *, const char *, const char *)
virtual void AddMenu(const char *, const char *)
virtual void AddIcon(const char *, const char *, const char *, const char *)