33 #include <wx/bitmap.h>
36 #include <wx/stattext.h>
37 #include <wx/statbox.h>
38 #include <wx/button.h>
55 #include <wx/bitmap.h>
103 wxPanel::Create( parent,
id, pos,
size, style );
108 GetSizer()->SetSizeHints(
this);
149 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
150 itemPanel1->SetSizer(itemBoxSizer2);
153 itemBoxSizer2->Add(
m_Tree, 1, wxGROW|wxALL, 5);
162 wxTreeItemId root_id =
m_Tree->AddRoot(
wxT(
"All Feature Types"));
164 wxTreeItemId prt_id =
m_Tree->AppendItem(root_id,
wxT(
"All Protein"));
165 wxTreeItemId rna_id =
m_Tree->AppendItem(root_id,
wxT(
"All Rna"));
166 wxTreeItemId imp_id =
m_Tree->AppendItem(root_id,
wxT(
"All Import"));
178 int feat_type = item.
GetType();
181 if (rxp && !rxp->
IsMatch(desc)) {
214 m_Tree->SetItemText(prt_id,
215 m_Tree->GetItemText(prt_id) +
220 m_Tree->SetItemText(rna_id,
221 m_Tree->GetItemText(rna_id) +
226 m_Tree->SetItemText(imp_id,
227 m_Tree->GetItemText(imp_id) +
243 wxTreeItemIdValue cookie;
244 for (wxTreeItemId cid =
m_Tree->GetFirstChild(
id, cookie); cid.IsOk(); cid=
m_Tree->GetNextChild(
id, cookie)){
252 if (
m_Tree->GetChildrenCount(
id,
false)==0) {
253 const wxTreeItemData* p0 =
m_Tree->GetItemData(
id);
259 if ((item->GetType() ==
fi.GetType()) &&
260 (item->GetSubtype() ==
fi.GetSubtype())){
268 wxTreeItemIdValue cookie;
269 for (wxTreeItemId cid =
m_Tree->GetFirstChild(
id, cookie); cid.IsOk(); cid=
m_Tree->GetNextChild(
id, cookie)){
328 if (
m_Tree->GetChildrenCount(
id,
false)==0) {
331 check.push_back(tid);
342 if (
m_Tree->IsExpanded(
id)) {
343 expand.push_back(tid);
347 if (find(expand.begin(), expand.end(), tid)!=expand.end()) {
351 wxTreeItemIdValue cookie;
352 for (wxTreeItemId cid =
m_Tree->GetFirstChild(
id, cookie); cid.IsOk(); cid=
m_Tree->GetNextChild(
id, cookie)){
CFeatListItem - basic configuration data for one "feature" type.
string GetDescription() const
CConfigurableItems - a static list of items that can be configured.
void AccessState(TStateVector &check, TStateVector &expand, bool bRead=true)
void x_SetSelections(const wxTreeItemId &id, TFeatTypeItemSet &set)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
objects::CFeatListItem TFeatTypeItem
void GetSelected(TFeatTypeItemSet &feat_types)
~CFeatureCheckPanel()
Destructor.
void SetSelected(TFeatTypeItemSet &feat_types)
CFeatureCheckPanel()
Constructors.
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=ID_CTREECHECKPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(300, 300), long style=wxTAB_TRAVERSAL)
Creation.
void x_AccessState(const wxTreeItemId &id, TStateVector &check, TStateVector &expand, bool bRead)
void Init()
Initialises member variables.
static bool ShowToolTips()
Should we show tooltips?
vector< string > TStateVector
void x_GetSelections(const wxTreeItemId &id, TFeatTypeItemSet &set)
static const CFeatList * GetFeatList()
bool GetCheck(const wxTreeItemId &item)
void SetCheck(const wxTreeItemId &item, bool bcheck=true)
void CheckAll(bool bcheck=true)
iterator_bool insert(const value_type &val)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
bool IsMatch(CTempString str, TMatch flags=fMatch_default)
Check existence substring which match a specified pattern.
static string WildcardToRegexp(CTempString mask)
Convert wildcard mask to regular expression.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * str(char *buf, int n)
C++ wrappers for the Perl-compatible regular expression (PCRE) library.
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)