NCBI C++ ToolKit
folder_edit_dlg.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_CORE___FOLDER_EDIT_DLG__HPP
2 #define GUI_CORE___FOLDER_EDIT_DLG__HPP
3 
4 /* $Id: folder_edit_dlg.hpp 25794 2012-05-10 14:53:54Z katargir $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Andrey Yazhuk
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistl.hpp>
36 
37 
39 
40 ////@begin includes
41 #include "wx/valgen.h"
42 ////@end includes
43 
44 
45 ////@begin control identifiers
46 #define SYMBOL_CFOLDEREDITDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxCLIP_CHILDREN|wxTAB_TRAVERSAL
47 #define SYMBOL_CFOLDEREDITDLG_TITLE _("Dialog")
48 #define SYMBOL_CFOLDEREDITDLG_IDNAME ID_CFOLDEREDITDLG
49 #define SYMBOL_CFOLDEREDITDLG_SIZE wxDefaultSize
50 #define SYMBOL_CFOLDEREDITDLG_POSITION wxDefaultPosition
51 ////@end control identifiers
52 
53 class wxButton;
54 class wxTextCtrl;
55 
57 
58 class CSerialObject;
59 
61  class CScope;
63 
65 {
66 public:
67  string m_Name;
68  string m_Comment;
69  //CTime m_CreateDate;
70 };
71 
72 class IFNameValidator;
73 
74 class CFolderEditDlg: public CDialog
75 {
76  DECLARE_DYNAMIC_CLASS( CFolderEditDlg )
77  DECLARE_EVENT_TABLE()
78 
79 public:
81  CFolderEditDlg( wxWindow* parent, wxWindowID id = SYMBOL_CFOLDEREDITDLG_IDNAME, const wxString& caption = SYMBOL_CFOLDEREDITDLG_TITLE, const wxPoint& pos = SYMBOL_CFOLDEREDITDLG_POSITION, const wxSize& size = SYMBOL_CFOLDEREDITDLG_SIZE, long style = SYMBOL_CFOLDEREDITDLG_STYLE );
82 
83  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CFOLDEREDITDLG_IDNAME, const wxString& caption = SYMBOL_CFOLDEREDITDLG_TITLE, const wxPoint& pos = SYMBOL_CFOLDEREDITDLG_POSITION, const wxSize& size = SYMBOL_CFOLDEREDITDLG_SIZE, long style = SYMBOL_CFOLDEREDITDLG_STYLE );
84 
86 
87  void Init();
88  void CreateControls();
89 
90 ////@begin CFolderEditDlg event handler declarations
91 
92  void OnInitDialog( wxInitDialogEvent& event );
93 
94  void OnRestoreBtn( wxCommandEvent& event );
95 
96  void OnOkClick( wxCommandEvent& event );
97 
98 ////@end CFolderEditDlg event handler declarations
99 
100 ////@begin CFolderEditDlg member function declarations
101 
102  wxString GetDescr() const { return m_Descr ; }
103  void SetDescr(wxString value) { m_Descr = value ; }
104 
105  bool GetReadOnly() const { return m_ReadOnly ; }
106  void SetReadOnly(bool value) { m_ReadOnly = value ; }
107 
108  wxString GetFolderName() const { return m_Name ; }
109  void SetFolderName(wxString value) { m_Name = value ; }
110 
111  wxBitmap GetBitmapResource( const wxString& name );
112 
113  wxIcon GetIconResource( const wxString& name );
114 ////@end CFolderEditDlg member function declarations
115 
116  static bool ShowToolTips();
117 
118 public:
119  void SetDataObject(const CSerialObject* object, objects::CScope* scope);
120  void SetNameValidator(IFNameValidator* validator);
121 
122 protected:
123 
124 ////@begin CFolderEditDlg member variables
125  wxTextCtrl* m_NameCtrl;
126  wxButton* m_RestoreBtn;
127  wxTextCtrl* m_DescrCtrl;
128 protected:
129  wxString m_Descr;
131  wxString m_Name;
132  enum {
134  ID_NAME = 10001,
135  ID_RESTORE = 10026,
136  ID_DESCR = 10025
137  };
138 ////@end CFolderEditDlg member variables
139 
141  objects::CScope* m_Scope;
143 };
144 
146 
147 #endif // GUI_CORE___FOLDER_EDIT_DLG__HPP
CDialog.
Definition: dialog.hpp:47
objects::CScope * m_Scope
void SetDescr(wxString value)
static bool ShowToolTips()
wxTextCtrl * m_DescrCtrl
wxString GetFolderName() const
wxTextCtrl * m_NameCtrl
IFNameValidator * m_NameValidator
const CSerialObject * m_Object
void OnRestoreBtn(wxCommandEvent &event)
wxString GetDescr() const
wxBitmap GetBitmapResource(const wxString &name)
void SetReadOnly(bool value)
void SetNameValidator(IFNameValidator *validator)
bool Create(wxWindow *parent, wxWindowID id=ID_CFOLDEREDITDLG, const wxString &caption=_("Dialog"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxCLIP_CHILDREN|wxTAB_TRAVERSAL)
void OnOkClick(wxCommandEvent &event)
void OnInitDialog(wxInitDialogEvent &event)
bool GetReadOnly() const
wxButton * m_RestoreBtn
wxIcon GetIconResource(const wxString &name)
void SetFolderName(wxString value)
void SetDataObject(const CSerialObject *object, objects::CScope *scope)
CScope –.
Definition: scope.hpp:92
Base class for all serializable objects.
Definition: serialbase.hpp:150
#define SYMBOL_CFOLDEREDITDLG_STYLE
#define SYMBOL_CFOLDEREDITDLG_IDNAME
#define SYMBOL_CFOLDEREDITDLG_TITLE
#define SYMBOL_CFOLDEREDITDLG_SIZE
#define SYMBOL_CFOLDEREDITDLG_POSITION
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
The NCBI C++/STL use hints.
Modified on Wed Jun 19 17:00:13 2024 by modify_doxy.py rev. 669887