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

Go to the SVN repository for this file.

1 /* $Id: wx_phylo_edit_dlg.hpp 30858 2014-07-31 14:05:43Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Vladimir Tereshkov
27  *
28  * File Description:
29  *
30  */
31 #ifndef _WX_PHYLO_EDIT_DLG_H_
32 #define _WX_PHYLO_EDIT_DLG_H_
33 
34 
35 /*!
36  * Includes
37  */
38 
39 #include <corelib/ncbistl.hpp>
40 #include <gui/utils/rgba_color.hpp>
44 
45 // This header must (at least indirectly) precede any wxWidgets headers.
47 
48 #include <wx/dialog.h>
49 
50 ////@begin includes
51 #include "wx/listctrl.h"
52 #include "wx/clrpicker.h"
53 #include "wx/statline.h"
54 ////@end includes
55 
56 /*!
57  * Forward declarations
58  */
59 
60 ////@begin forward declarations
61 class wxListCtrl;
62 class wxColourPickerCtrl;
63 ////@end forward declarations
64 
65 /*!
66  * Control identifiers
67  */
69 
70 ////@begin control identifiers
71 #define ID_CWXPHYLOEDITDLG 10000
72 #define ID_LISTCTRL1 10002
73 #define ID_BUTTON4 10003
74 #define ID_BUTTON5 10010
75 #define ID_BUTTON 10001
76 #define ID_TEXTCTRL14 10011
77 #define ID_TEXTCTRL15 10012
78 #define ID_COLOURCTRL 10042
79 #define ID_STATICLINE1 10004
80 #define SYMBOL_CWXPHYLOEDITDLG_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
81 #define SYMBOL_CWXPHYLOEDITDLG_TITLE _("Node Properties")
82 #define SYMBOL_CWXPHYLOEDITDLG_IDNAME ID_CWXPHYLOEDITDLG
83 #define SYMBOL_CWXPHYLOEDITDLG_SIZE wxSize(400, 300)
84 #define SYMBOL_CWXPHYLOEDITDLG_POSITION wxDefaultPosition
85 ////@end control identifiers
86 
87 /*!
88  * CwxPhyloEditDlg class declaration
89  */
90 
91 class CwxPhyloEditDlg: public wxDialog
92 {
93  DECLARE_DYNAMIC_CLASS( CwxPhyloEditDlg )
94  DECLARE_EVENT_TABLE()
95 
96 public:
98  CwxPhyloEditDlg( wxWindow* parent, wxWindowID id = SYMBOL_CWXPHYLOEDITDLG_IDNAME, const wxString& caption = SYMBOL_CWXPHYLOEDITDLG_TITLE, const wxPoint& pos = SYMBOL_CWXPHYLOEDITDLG_POSITION, const wxSize& size = SYMBOL_CWXPHYLOEDITDLG_SIZE, long style = SYMBOL_CWXPHYLOEDITDLG_STYLE );
99 
100  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CWXPHYLOEDITDLG_IDNAME, const wxString& caption = SYMBOL_CWXPHYLOEDITDLG_TITLE, const wxPoint& pos = SYMBOL_CWXPHYLOEDITDLG_POSITION, const wxSize& size = SYMBOL_CWXPHYLOEDITDLG_SIZE, long style = SYMBOL_CWXPHYLOEDITDLG_STYLE );
101 
103 
104  void Init();
105 
106  void CreateControls();
107 
108  void SetParams(CPhyloTree* tree,
109  CPhyloTree::TTreeIdx node_idx,
110  CFeatureEdit* updated_feature);
111 
112 ////@begin CwxPhyloEditDlg event handler declarations
113 
114  void OnListctrl1Selected( wxListEvent& event );
115 
116  void OnListctrl1Deselected( wxListEvent& event );
117 
118  void OnButton4Click( wxCommandEvent& event );
119 
120  void OnButton5Click( wxCommandEvent& event );
121 
122  void OnButtonClick( wxCommandEvent& event );
123 
124  void OnColourctrlColourPickerChanged( wxColourPickerEvent& event );
125 
126  void OnOkClick( wxCommandEvent& event );
127 
128 ////@end CwxPhyloEditDlg event handler declarations
129 
130 ////@begin CwxPhyloEditDlg member function declarations
131 
132  wxBitmap GetBitmapResource( const wxString& name );
133 
134  wxIcon GetIconResource( const wxString& name );
135 ////@end CwxPhyloEditDlg member function declarations
136 
137  static bool ShowToolTips();
138 
139 ////@begin CwxPhyloEditDlg member variables
140  wxListCtrl* m_List;
141  wxTextCtrl* m_Name;
142  wxTextCtrl* m_Value;
143  wxColourPickerCtrl* m_ColorPicker;
144 ////@end CwxPhyloEditDlg member variables
145 
149 
150 protected:
151  void x_UpdateSelectedRow();
152 };
153 
155 
156 #endif // _WX_PHYLO_EDIT_DLG_H_
Tree subclass also has functions and data needed for rendering and selection.
Definition: phylo_tree.hpp:52
void OnButton4Click(wxCommandEvent &event)
void SetParams(CPhyloTree *tree, CPhyloTree::TTreeIdx node_idx, CFeatureEdit *updated_feature)
void OnButtonClick(wxCommandEvent &event)
static bool ShowToolTips()
wxIcon GetIconResource(const wxString &name)
void OnColourctrlColourPickerChanged(wxColourPickerEvent &event)
void OnButton5Click(wxCommandEvent &event)
void OnListctrl1Selected(wxListEvent &event)
bool Create(wxWindow *parent, wxWindowID id=10000, const wxString &caption=_("Node Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
wxColourPickerCtrl * m_ColorPicker
CFeatureEdit * m_UpdatedFeature
CPhyloTree::TTreeIdx m_NodeIdx
void OnOkClick(wxCommandEvent &event)
void OnListctrl1Deselected(wxListEvent &event)
Workaround for wxWidgets header errors in certain configurations; MUST be included (at least indirect...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const struct ncbi::grid::netcache::search::fields::SIZE size
The NCBI C++/STL use hints.
Edits for one or more nodes.
#define SYMBOL_CWXPHYLOEDITDLG_POSITION
#define SYMBOL_CWXPHYLOEDITDLG_STYLE
#define SYMBOL_CWXPHYLOEDITDLG_TITLE
#define SYMBOL_CWXPHYLOEDITDLG_IDNAME
#define SYMBOL_CWXPHYLOEDITDLG_SIZE
Modified on Mon May 27 04:37:35 2024 by modify_doxy.py rev. 669887