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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_WX___ADVANCED_FILE_INPUT__HPP
2 #define GUI_WIDGETS_WX___ADVANCED_FILE_INPUT__HPP
3 
4 /* $Id: advanced_file_input.hpp 25656 2012-04-18 13:34:16Z falkrb $
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 
36 #include <gui/gui_export.h>
37 #include <wx/combobox.h>
38 
40 
41 
42 ///////////////////////////////////////////////////////////////////////////////
43 /// CAdvancedFileInput
45  public wxComboBox
46 {
47  DECLARE_EVENT_TABLE()
48 public:
49  CAdvancedFileInput(wxWindow* parent, wxWindowID id = wxID_ANY);
50  CAdvancedFileInput(wxWindow* parent,
51  wxWindowID id,
52  const wxString& value,
53  const wxPoint& pos,
54  const wxSize& size,
55  const wxArrayString& choices,
56  long style = 0,
57  const wxValidator& validator = wxDefaultValidator,
58  const wxString& name = wxT("advanced file input"));
59 
60  virtual ~CAdvancedFileInput();
61 
62  void Init();
63  void Create(wxWindow* parent,
64  wxWindowID id,
65  const wxString& value,
66  const wxPoint& pos,
67  const wxSize& size,
68  const wxArrayString& choices,
69  long style = 0,
70  const wxValidator& validator = wxDefaultValidator,
71  const wxString& name = wxT("advanced file input"));
72 
73  void SetFileSpec(const wxString& filespec);
74 
75  void OnTextChanged(wxCommandEvent& event);
76  void OnItemSelected(wxCommandEvent& event);
77 
78 protected:
79  void x_UpdateCombo(const wxString& s_path);
80 
81 protected:
83 
84  wxString m_FileSpec;
85  wxString m_PrevValue; // last processed input value
86  wxArrayString m_PrevArray; // last string array
87 
88 public:
89  /// event id for any filename text change events
90  const static wxEventType s_InputTxtChangedEvt;
91 };
92 
93 
95 
96 /* @} */
97 
98 #endif // GUI_WIDGETS_WX___ADVANCED_FILE_INPUT__HPP
CAdvancedFileInput.
static const wxEventType s_InputTxtChangedEvt
event id for any filename text change events
static void Init(void)
Definition: cursor6.c:76
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_WX_EXPORT
Definition: gui_export.h:543
Defines to provide correct exporting from DLLs in Windows.
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
static static static wxID_ANY
Modified on Sat Apr 20 12:16:38 2024 by modify_doxy.py rev. 669887