31 #if defined(G4UI_BUILD_WT_SESSION) || defined(G4UI_USE_WT)
40 #include <Wt/WPushButton>
42 #include <Wt/WTreeNode>
44 #include <Wt/WTabWidget>
45 #include <Wt/WStringListModel>
71 class G4WTabWidget :
public Wt::WTabWidget {
74 G4WTabWidget(Wt::WContainerWidget*&);
75 inline void setTabSelected(
bool a) { tabSelected =
a; };
76 inline void setLastTabCreated(
int a) { lastCreated =
a; };
77 inline bool isTabSelected() {
return tabSelected; };
92 void AddMenu(
const char*,
const char*);
97 void AddButton(
const char*,
const char*,
const char*);
103 void AddIcon(
const char* userLabel,
const char* iconFile,
const char* command,
const char* file_name=
"");
111 bool AddTabWidget( Wt::WWidget*, Wt::WString,
int,
int);
114 Wt::WTabWidget* GetSceneTreeComponentsTBWidget();
117 bool IsSplitterReleased();
119 inline bool IsIconMoveSelected() {
120 return fMoveSelected;
122 inline bool IsIconRotateSelected() {
123 return fRotateSelected;
125 inline bool IsIconPickSelected() {
126 return fPickSelected;
128 inline bool IsIconZoomInSelected() {
129 return fZoomInSelected;
131 inline bool IsIconZoomOutSelected() {
132 return fZoomOutSelected;
148 inline Wt::WContainerWidget * GetMainWindow() {
155 void SessionTerminate();
163 void CreateHelpWidget();
164 void InitHelpTreeAndVisParametersWidget();
169 Wt::WTreeNode* FindTreeItem( Wt::WTreeNode *,
const std::string&);
174 bool eventFilter(Wt::WObject*,Wt::WEvent*);
178 Wt::WContainerWidget* CreateVisParametersTBWidget();
179 Wt::WWidget* CreateHelpTBWidget();
180 Wt::WWidget* CreateCoutTBWidget();
181 Wt::WWidget* CreateHistoryTBWidget();
182 Wt::WWidget* CreateUITabWidget();
183 Wt::WWidget* CreateSceneTreeComponentsTBWidget();
184 Wt::WContainerWidget* CreateRightSplitterWidget();
185 Wt::WContainerWidget* CreateLeftSplitterWidget();
186 void OpenHelpTreeOnCommand(
const Wt::WString &);
187 Wt::WString GetShortCommandPath(
const std::string & );
188 Wt::WString GetLongCommandPath( Wt::WTreeNode*);
190 bool CreateVisCommandGroupAndToolBox(
G4UIcommand*, Wt::WWidget*,
int,
bool isDialog);
191 bool CreateCommandWidget(
G4UIcommand* command, Wt::WContainerWidget* parent,
bool isDialog);
195 Wt::WContainerWidget * fMainWindow;
196 Wt::WLabel *fCommandLabel;
197 Wt::WLineEdit * fCommandArea;
198 Wt::WTextArea *fCoutTBTextArea;
199 Wt::WTextArea *fHelpArea;
200 Wt::WTabWidget* fUITabWidget;
201 Wt::WStringListModel fG4cout;
202 Wt::WLineEdit * fCoutFilter;
204 Wt::WSelectionBox *fHistoryTBTableList;
205 Wt::WTree *fHelpTreeWidget;
206 Wt::WPanel* fHelpTBWidget;
207 Wt::WPanel* fHistoryTBWidget;
208 Wt::WPanel* fCoutTBWidget;
209 Wt::WTabWidget* fSceneTreeComponentsTBWidget;
210 Wt::WLineEdit* fHelpLine;
211 G4WTabWidget* fViewerTabWidget;
212 Wt::WString fCoutText;
213 Wt::WLabel *fEmptyViewerTabLabel;
214 Wt::WContainerWidget* fMainSplitterWidget;
215 Wt::WContainerWidget* fRightSplitterWidget;
216 Wt::WContainerWidget* fLeftSplitterWidget;
217 Wt::WContainerWidget* fHelpVSplitter;
219 Wt::WToolBar *fToolbarApp;
220 Wt::WToolBar *fToolbarUser;
221 Wt::WString fStringSeparator;
223 Wt::WString fLastOpenPath;
226 bool fRotateSelected;
228 bool fZoomInSelected;
229 bool fZoomOutSelected;
236 void ClearButtonCallback();
237 void CommandEnteredCallback();
238 void CommandEditedCallback(
const Wt::WString & text);
239 void ButtonCallback(
const char*);
240 void HelpTreeClicCallback();
241 void HelpTreeDoubleClicCallback();
242 void ShowHelpCallback();
243 void CommandHistoryCallback();
244 void LookForHelpStringCallback();
245 void CurrentChangedTabWidgetCallback(
int);
246 void CoutFilterCallback(
const Wt::WString&);
247 void TabCloseCallback(
int);
248 void ToolBoxActivated(
int);
249 void VisParameterCallback(Wt::WContainerWidget*);
250 void ChangeColorCallback(Wt::WContainerWidget*);
251 void ChangeCursorStyle(
const Wt::WString&);
252 void ChangeSurfaceStyle(
const Wt::WString&);
253 void OpenIconCallback(
const Wt::WString&);
254 void SaveIconCallback(
const Wt::WString&);
255 void ChangePerspectiveOrthoCallback(
const Wt::WString&);