1 #ifndef BROWSEINPUTDIALOG_H
2 #define BROWSEINPUTDIALOG_H
3 
4 #include "TextLabel.h"
5 #include "DialogBox.h"
6 
7 // Browse types
8 enum
9 {
10     BROWSE_INPUT_FILE,
11     BROWSE_INPUT_FOLDER,
12     BROWSE_INPUT_MIXED
13 };
14 
15 class XComApp;
16 
17 class BrowseInputDialog : public DialogBox
18 {
19     FXDECLARE(BrowseInputDialog)
20 protected:
21     FXTextField*       input;
22     TextLabel*         msg;
23     FXLabel*           iconlabel;
24     FXHorizontalFrame* checkbutton;
25     FXuint             browsetype;
26     FXString           initialdir;
27 private:
BrowseInputDialog()28     BrowseInputDialog() : input(NULL), msg(NULL), iconlabel(NULL), checkbutton(NULL), browsetype(0)
29     {}
30 public:
31     enum
32     {
33         ID_BROWSE_PATH=DialogBox::ID_LAST,
34         ID_LAST
35     };
36     BrowseInputDialog(FXWindow*, FXString, FXString, FXString, FXString label = "", FXIcon* ic = NULL, FXuint browse = BROWSE_INPUT_FILE, FXbool option = false, FXString = FXString::null);
37     virtual void create();
38 
39     virtual ~BrowseInputDialog();
40     long onCmdKeyPress(FXObject*, FXSelector, void*);
41     long onCmdBrowsePath(FXObject*, FXSelector, void*);
42     void setMessage(FXString);
43     void setIcon(FXIcon*);
44     void setDirectory(const FXString&);
45     FXString getText();
46     void setText(const FXString&);
47     void selectAll();
48     void CursorEnd();
49     void setSelection(int, int);
50 };
51 #endif
52