]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxFileSelector.h
f483a243ccfaef4330e7ccbddff80a41684ed5e9
[bbtk.git] / packages / wx / src / bbwxFileSelector.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbwxFileSelector.h,v $
5   Language:  C++
6   Date:      $Date: 2008/06/26 07:37:11 $
7   Version:   $Revision: 1.4 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*//**
18  * \brief Short description in one line
19  * 
20  * Long description which 
21  * can span multiple lines
22  */
23 /**
24  * \file 
25  * \brief Pattern for the definition of a new type of Node (header)
26  */
27 /**
28  * \class bbtk::NodePatern 
29  * \brief Pattern for the definition of a new type of Node 
30  */
31
32
33 #ifdef _USE_WXWIDGETS_
34
35
36 #ifndef __bbWxFileSelector_h__
37 #define __bbWxFileSelector_h__
38
39 #include "bbtkAtomicBlackBox.h"
40
41
42
43 namespace bbwx
44 {
45   
46   
47   
48
49   //=================================================================
50   class /*BBTK_EXPORT*/ FileSelector : public bbtk::AtomicBlackBox
51   {
52     BBTK_BLACK_BOX_INTERFACE(FileSelector,bbtk::AtomicBlackBox);
53     BBTK_DECLARE_INPUT(Title,std::string);
54     BBTK_DECLARE_INPUT(Message,std::string);
55     BBTK_DECLARE_INPUT(DefaultDir,std::string);
56     BBTK_DECLARE_INPUT(DefaultFile,std::string);
57     BBTK_DECLARE_INPUT(Wildcard,std::string);
58     BBTK_DECLARE_INPUT(OpenSave,std::string);
59     BBTK_DECLARE_OUTPUT(Out,std::string);
60     BBTK_PROCESS(Process);
61     void Process();
62
63   protected:
64     virtual void bbUserConstructor();
65
66   };
67   //=================================================================
68   
69  
70   //=================================================================
71   // AtomicBlackBox description
72   BBTK_BEGIN_DESCRIBE_BLACK_BOX(FileSelector,bbtk::AtomicBlackBox);
73   BBTK_NAME("FileSelector");
74   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
75   BBTK_CATEGORY("widget");
76   BBTK_DESCRIPTION("Pops up a file selection dialog for reading or saving (wxFileDialog)");
77   BBTK_INPUT(FileSelector,Title,"Title of the dialog",std::string,"");
78   BBTK_INPUT(FileSelector,Message,"Message to show on the dialog",
79              std::string,"");
80   BBTK_INPUT(FileSelector,DefaultDir,"The default directory",std::string,"");
81   BBTK_INPUT(FileSelector,DefaultFile,"The default filename",std::string,"file name");
82   BBTK_INPUT(FileSelector,Wildcard,"A wildcard, such as \"*.*\" or \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"",std::string,"wildcard");
83   BBTK_INPUT(FileSelector,OpenSave,"Open for an open dialog (default) / Save for a save dialog",std::string,"");
84   BBTK_OUTPUT(FileSelector,Out,"The file selected by the user",std::string,"file name");
85   BBTK_END_DESCRIBE_BLACK_BOX(FileSelector);
86   //=================================================================
87
88
89
90 }
91
92
93
94 //namespace bbtk
95 #endif  //__bbtkWxFileSelector_h__
96
97 #endif //_USE_WXWIDGETS_