Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoMenuFileSelection.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Nicolas DAGUISE (Oct 2002)
22**=======================================================================*/
23#ifndef _SO_MENU_FILE_SELECTION_
24#define _SO_MENU_FILE_SELECTION_
25
26#include <DialogViz/dialog/SoMenuPushButton.h>
27#include <Inventor/fields/SoMFString.h>
28#include <Inventor/fields/SoSFFilePathString.h>
29#include <Inventor/fields/SoSFInt32.h>
30
32
77{
78 SO_DG_HEADER(SoMenuFileSelection);
79
80 public:
81
86
101
106
111
116
117 enum Mode {
119 OPEN = 0x01,
121 SAVE = 0x02
122 };
123
129
134
139
144
145/*==============================================================================*/
146private:
147 static void initClass();
148 static void exitClass();
149 virtual void menuEvent(void* parent, int itemId);
150 void validateFilename();
151 void setIsOpened(SbBool iso) { m_isOpenedWindow = iso; };
152 void applyDlgCptAuditor();
153
154private:
155 virtual ~SoMenuFileSelection();
156
157 void openDialogBox();
158
159 SbString m_dirPath; // saved current directory
160
161private:
162 SbBool m_isOpenedWindow;
163
165// 3D methods
166private:
167
168private:
169 virtual void add3DCallbackMethods();
170
171private:
172 static void finishCB3D( void *, SoDragger *inDragger );
173 virtual void draggerFinishCallback3D();
174
176};
177
178#endif // _SO_MENU_FILE_SELECTION_
179
180
Class for smart character strings.
Definition SbString.h:202
Base class for nodekits that move in response to click-drag-release mouse events.
Definition SoDragger.h:537
Multiple-value field containing any number of strings.
Definition SoMFString.h:116
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu FileSelecti...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu file select...
SoSFFilePathString filename
Initial filename and selected filename.
SoMenuFileSelection()
Initial filename and selected filename.
void addAuditor(SoMenuFileSelectionAuditor *auditor)
Adds a menuFileSelectionAuditor to current PushButton component.
void removeAuditor(SoMenuFileSelectionAuditor *auditor)
Removes the defined fileSelectionAuditor from the auditor list.
SoMFString filter
List of filters.
SoSFEnum mode
The file selection dialog box is configured for opening or saving a file according to the value of th...
@ OPEN
File opening mode (Default).
@ SAVE
File saving mode.
SoSFInt32 defaultFilter
Default filter to use when loading file selection box.
SoSFString title
Title of the file selection dialog box.
SoSFFilePathString fileDirectory
Initial directory and selected directory.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu pushbutton ...
Field containing an enumerated value.
Definition SoSFEnum.h:89
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Field containing a string.
Definition SoSFString.h:117
int SbBool
Boolean type.
Definition SbBase.h:87