A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/wx__phylo__edit__dlg_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/phylo_tree/wx_phylo_edit_dlg.cpp Source File

51 #include <wx/stattext.h> 52 #include <wx/statline.h> 53 #include <wx/statbox.h> 54 #include <wx/combobox.h> 56 #include <wx/clrpicker.h> 57 #include <wx/checklst.h> 58 #include <wx/valgen.h> 59 #include <wx/bitmap.h> 61 #include <wx/listbook.h> 62 #include <wx/listctrl.h> 63 #include <wx/msgdlg.h> 95

, m_UpdatedFeature(

NULL

)

103

, m_UpdatedFeature(

NULL

)

106  Create

(parent,

id

, caption, pos,

size

, style);

112 

SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY|wxWS_EX_BLOCK_EVENTS);

113

wxDialog::Create( parent,

id

, caption, pos,

size

, style );

118

GetSizer()->SetSizeHints(

this

);

146

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

147

itemDialog1->SetSizer(itemBoxSizer2);

149

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

150

itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);

152  m_List

=

new

wxListCtrl( itemDialog1,

ID_LISTCTRL1

, wxDefaultPosition, wxSize(300, 120), wxLC_REPORT );

153

itemBoxSizer3->Add(

m_List

, 0, wxALIGN_TOP|wxALL, 5);

155

wxBoxSizer* itemBoxSizer5 =

new

wxBoxSizer(wxVERTICAL);

156

itemBoxSizer3->Add(itemBoxSizer5, 0, wxALIGN_TOP|wxALL, 5);

158

wxButton* itemButton6 =

new

wxButton( itemDialog1,

ID_BUTTON4

,

_

(

"Add"

), wxDefaultPosition, wxDefaultSize, 0 );

159

itemBoxSizer5->Add(itemButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

161

wxButton* itemButton7 =

new

wxButton( itemDialog1,

ID_BUTTON5

,

_

(

"Remove"

), wxDefaultPosition, wxDefaultSize, 0 );

162

itemBoxSizer5->Add(itemButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

164

wxButton* itemButton8 =

new

wxButton( itemDialog1,

ID_BUTTON

,

_

(

"Update"

), wxDefaultPosition, wxDefaultSize, 0 );

165

itemBoxSizer5->Add(itemButton8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

167

wxStaticBox* itemStaticBoxSizer9Static =

new

wxStaticBox(itemDialog1,

wxID_ANY

, wxEmptyString);

168

wxStaticBoxSizer* itemStaticBoxSizer9 =

new

wxStaticBoxSizer(itemStaticBoxSizer9Static, wxVERTICAL);

169

itemBoxSizer2->Add(itemStaticBoxSizer9, 1, wxGROW|wxALL, 5);

171

wxBoxSizer* itemBoxSizer10 =

new

wxBoxSizer(wxHORIZONTAL);

172

itemStaticBoxSizer9->Add(itemBoxSizer10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT, 5);

174

wxStaticText* itemStaticText11 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Name"

), wxDefaultPosition, wxDefaultSize, 0 );

175

itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

177  m_Name

=

new

wxTextCtrl( itemDialog1,

ID_TEXTCTRL14

, wxEmptyString, wxDefaultPosition, wxSize(150, -1), 0 );

178

itemBoxSizer10->Add(

m_Name

, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);

180

wxBoxSizer* itemBoxSizer13 =

new

wxBoxSizer(wxHORIZONTAL);

181

itemStaticBoxSizer9->Add(itemBoxSizer13, 1, wxGROW|wxLEFT|wxRIGHT, 5);

183

wxBoxSizer* itemBoxSizer14 =

new

wxBoxSizer(wxHORIZONTAL);

184

itemBoxSizer13->Add(itemBoxSizer14, 1, wxALIGN_TOP|wxRIGHT|wxTOP|wxBOTTOM, 5);

186

wxStaticText* itemStaticText15 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Value"

), wxDefaultPosition, wxDefaultSize, 0 );

187

itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

189  m_Value

=

new

wxTextCtrl( itemDialog1,

ID_TEXTCTRL15

, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );

190

itemBoxSizer14->Add(

m_Value

, 1, wxGROW|wxALL, 5);

192

wxStaticText* itemStaticText17 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Color"

), wxDefaultPosition, wxDefaultSize, 0 );

193

itemBoxSizer14->Add(itemStaticText17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

195  m_ColorPicker

=

new

wxColourPickerCtrl( itemDialog1,

ID_COLOURCTRL

, wxColour(0, 255, 0), wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );

196

itemBoxSizer13->Add(

m_ColorPicker

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

198

wxStaticLine* itemStaticLine19 =

new

wxStaticLine( itemDialog1,

ID_STATICLINE1

, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );

199

itemBoxSizer2->Add(itemStaticLine19, 0, wxGROW|wxALL, 5);

201

wxStdDialogButtonSizer* itemStdDialogButtonSizer20 =

new

wxStdDialogButtonSizer;

203

itemBoxSizer2->Add(itemStdDialogButtonSizer20, 0, wxALIGN_RIGHT|wxALL, 5);

204

wxButton* itemButton21 =

new

wxButton( itemDialog1, wxID_OK,

_

(

"&OK"

), wxDefaultPosition, wxDefaultSize, 0 );

205

itemStdDialogButtonSizer20->AddButton(itemButton21);

207

wxButton* itemButton22 =

new

wxButton( itemDialog1, wxID_CANCEL,

_

(

"&Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

208

itemStdDialogButtonSizer20->AddButton(itemButton22);

210

itemStdDialogButtonSizer20->Realize();

218

wxString

n

=

m_Name

->GetValue();

221  if

(

n

.Length() == 0)

230

item_num =

m_List

->GetNextItem(item_num,

232

wxLIST_STATE_DONTCARE);

233  if

( item_num == -1 )

237  info

.m_itemId = item_num;

238  info

.m_mask = wxLIST_MASK_TEXT;

243

wxString

msg

=

wxT

(

"Item '"

);

245  msg

+=

wxT

(

"' is already a property.\n"

);

246  msg

+=

wxT

(

"Select the property from the list to update it."

);

248

wxMessageBox(

msg

,

wxT

(

"Duplicate Property Name"

),

249

wxOK | wxICON_WARNING);

257

wxListItem* item =

new

wxListItem();

258

item->SetId(

count

);

259  m_List

->InsertItem(*item);

268  if

(

m_List

->GetSelectedItemCount() == 0)

272  auto

index =

m_List

->GetNextItem(-1,

274

wxLIST_STATE_SELECTED);

276  m_List

->DeleteItem(index);

293

item =

m_List

->GetNextItem(item,

295

wxLIST_STATE_DONTCARE);

300  info

.m_itemId = item;

301  info

.m_mask = wxLIST_MASK_TEXT;

313  for

(

id

=0;

id

< 255;

id

++){

322  "CPhyloTreeNode::SetFeature - maximum number of features exceeded"

);

360  int

w =

m_List

->GetSize().GetWidth();

363  m_List

->InsertColumn(0,

wxT

(

"Name"

), wxLIST_FORMAT_LEFT, w/3 );

364  m_List

->InsertColumn(1,

wxT

(

"Value"

), wxLIST_FORMAT_LEFT, (w*2)/3 );

373  string

sValue = it->value;

375

wxListItem* item =

new

wxListItem();

377  m_List

->InsertItem(*item);

389  if

(

m_List

->GetSelectedItemCount() == 0)

393  auto

index =

m_List

->GetNextItem(-1,

395

wxLIST_STATE_SELECTED);

398  info

.m_itemId = index;

399  info

.m_mask = wxLIST_MASK_TEXT;

401

wxString name =

m_List

->GetItem(

info

) ?

info

.m_text : wxString(

""

);

410

string::size_type idx1 = current_value.find_first_of(

'['

);

411  if

(idx1 != string::npos) {

412

string::size_type idx2 = current_value.find_first_of(

']'

);

413  if

(idx2 != string::npos && idx2 > idx1) {

416  string

color_str = current_value.substr(idx1, idx2-idx1 + 1);

422  color

.GetBlueUC()));

444  if

(

m_List

->GetSelectedItemCount() == 0)

448  auto

index =

m_List

->GetNextItem(-1,

450

wxLIST_STATE_SELECTED);

453

wxString

n

=

m_Name

->GetValue();

456  if

(

n

.Length() == 0)

473

string::size_type idx1 = current_value.find_first_of(

'['

);

474  if

(idx1 != string::npos) {

475

string::size_type idx2 = current_value.find_first_of(

']'

);

476  if

(idx2 != string::npos && idx2 > idx1) {

478  string

old_color_str = current_value.substr(idx1, idx2-idx1 + 1);

488

current_value.replace(idx1, idx2-idx1 + 1, new_color_str);

499

new_color.

SetAlpha

((

unsigned char

)64);

Things for representing and manipulating bio trees.

Features storage for the bio tree node.

Tree subclass also has functions and data needed for rendering and selection.

CBioTreeFeatureDictionary & GetFeatureDict()

Return feature dictionary.

class CRgbaColor provides a simple abstraction for managing colors.

void OnButton4Click(wxCommandEvent &event)

void x_UpdateSelectedRow()

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)

const_iterator find(const key_type &key) const

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

string ToString(bool printAlpha=true, bool uchars=true) const

Return a string representation of the current color.

float GetAlpha(void) const

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static string & ToLower(string &str)

Convert string to lower case – string& version.

unsigned int TBioTreeFeatureId

Feature Id.

TBioTreeFeatureId GetId(const string &feature_name) const

If feature is already registered returns its id by name.

const TFeatureList & GetFeatureList() const

Return reference on the internal container.

TBioTreeFeatureId Register(const string &feature_name)

Register new feature, return its id.

bool HasFeature(const string &feature_name) const

Check if feature is listed in the dictionary.

const TFeatureDict & GetFeatureDict() const

Get reference on the internal map.

vector< CBioTreeFeaturePair > TFeatureList

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Edits for one or more nodes.

vector< CUpdatedFeature > & GetUpdated()

CBioTreeFeatureDictionary & GetDictionary()

wxString ToWxString(const string &s)

string ToStdString(const wxString &s)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4