(parent,
id, caption, pos,
size, style);
86SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
87wxDialog::Create( parent,
id, caption, pos,
size, style );
92GetSizer()->SetSizeHints(
this);
122wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
123itemDialog1->SetSizer(itemBoxSizer2);
125wxStaticBox* itemStaticBoxSizer3Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Label Properties"));
126wxStaticBoxSizer* itemStaticBoxSizer3 =
newwxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);
127itemBoxSizer2->Add(itemStaticBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
129wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
130itemStaticBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5);
132wxStaticText* itemStaticText5 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Tree Label:"), wxDefaultPosition, wxDefaultSize, 0 );
133itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
136itemBoxSizer4->Add(
m_TreeName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
138wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxHORIZONTAL);
139itemStaticBoxSizer3->Add(itemBoxSizer7, 0, wxALIGN_LEFT|wxALL, 5);
141wxStaticText* itemStaticText8 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Position (%x, %y): ("), wxDefaultPosition, wxDefaultSize, 0 );
142itemBoxSizer7->Add(itemStaticText8, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
145 m_LabelPosX->SetHelpText(
_(
"The X position, as a %(0..100) of screen width"));
147 m_LabelPosX->SetToolTip(
_(
"The X position, as a %(0..100) of screen width"));
148itemBoxSizer7->Add(
m_LabelPosX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
150wxStaticText* itemStaticText10 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
", "), wxDefaultPosition, wxDefaultSize, 0 );
151itemBoxSizer7->Add(itemStaticText10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
154 m_LabelPosY->SetHelpText(
_(
"The Y position, as a %(0..100) of screen height"));
156 m_LabelPosY->SetToolTip(
_(
"The Y position, as a %(0..100) of screen height"));
157itemBoxSizer7->Add(
m_LabelPosY, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
159wxStaticText* itemStaticText12 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
")"), wxDefaultPosition, wxDefaultSize, 0 );
160itemBoxSizer7->Add(itemStaticText12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
162wxBoxSizer* itemBoxSizer13 =
newwxBoxSizer(wxHORIZONTAL);
163itemStaticBoxSizer3->Add(itemBoxSizer13, 0, wxALIGN_LEFT|wxALL, 5);
165wxStaticBox* itemStaticBoxSizer14Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Font"));
166wxStaticBoxSizer* itemStaticBoxSizer14 =
newwxStaticBoxSizer(itemStaticBoxSizer14Static, wxHORIZONTAL);
167itemStaticBoxSizer3->Add(itemStaticBoxSizer14, 0, wxALIGN_LEFT|wxALL, 5);
169wxFlexGridSizer* itemFlexGridSizer15 =
newwxFlexGridSizer(0, 2, 0, 0);
170itemStaticBoxSizer14->Add(itemFlexGridSizer15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
172wxStaticText* itemStaticText16 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Font Face:"), wxDefaultPosition, wxDefaultSize, 0 );
173itemFlexGridSizer15->Add(itemStaticText16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
175wxArrayString m_FontNameStrings;
177itemFlexGridSizer15->Add(
m_FontName, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
179wxStaticText* itemStaticText18 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Font Size:"), wxDefaultPosition, wxDefaultSize, 0 );
180itemFlexGridSizer15->Add(itemStaticText18, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
182wxArrayString m_FontSizeStrings;
183m_FontSizeStrings.Add(
_(
"10"));
186itemFlexGridSizer15->Add(
m_FontSize, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
188wxStaticText* itemStaticText20 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Font Color:"), wxDefaultPosition, wxDefaultSize, 0 );
189itemFlexGridSizer15->Add(itemStaticText20, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
192itemFlexGridSizer15->Add(
m_FontColorPicker, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
194wxStdDialogButtonSizer* itemStdDialogButtonSizer22 =
newwxStdDialogButtonSizer;
196itemBoxSizer2->Add(itemStdDialogButtonSizer22, 0, wxALIGN_RIGHT|wxALL, 5);
197wxButton* itemButton23 =
newwxButton( itemDialog1, wxID_OK,
_(
"&OK"), wxDefaultPosition, wxDefaultSize, 0 );
198itemStdDialogButtonSizer22->AddButton(itemButton23);
200wxButton* itemButton24 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
201itemStdDialogButtonSizer22->AddButton(itemButton24);
203itemStdDialogButtonSizer22->Realize();
215wxArrayString font_faces;
216wxArrayString font_sizes;
218std::vector<string> faces;
219std::vector<string> sizes;
225 for(idx = 0; idx<faces.size(); ++idx)
227 for(idx = 0; idx<sizes.size(); ++idx)
299 if(!TransferDataFromWindow())
314wxMessageBox(
"The X and Y values must be integers between 0 and 100",
"Input Error");
318 if(posx < 0 || posx > 100 || posy < 0 || posy > 100) {
319wxMessageBox(
"The X and Y values must be numbers between 0 and 100",
"Input Error");
333 _TRACE(
"Unexpected error converting font size "+ sfont_size +
" to integer");
339 CRgbaColorc(wc.Red(), wc.Green(), wc.Blue(), wc.Alpha());
CTreeLabel GetTreeLabel() const
void SetTreeLabel(const CTreeLabel &l)
Label for tree (optional element of biotreecontainer)
const CGlTextureFont & GetFont(void) const
class CRgbaColor provides a simple abstraction for managing colors.
string GetFontName() const
CRgbaColor GetColor() const
void OnLabelPosYTextUpdated(wxCommandEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
void OnOkClick(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=10046, const wxString &caption=_("Tree Label Edit"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
wxColourPickerCtrl * m_FontColorPicker
void SetParams(CPhyloTreeDataSource *ds, CPhyloTreeScheme *sl)
static bool ShowToolTips()
CPhyloTreeDataSource * m_DS
void OnLabelFontChoiceSelected(wxCommandEvent &event)
void OnLabelPosXTextUpdated(wxCommandEvent &event)
The NCBI C++ standard methods for dealing with std::string.
static void GetAllFaces(vector< string > &faces)
GetAllFaces() and GetAllSizes() fills containers with strings repesenting all available enumerated (p...
static string FaceToString(EFontFace face)
funtions below provide conversion of font parameters to strings and back.
EFontFace GetFontFace() const
static void GetAllSizes(vector< string > &sizes)
unsigned int GetFontSize() const
unsigned char GetRedUC(void) const
Get specific channels in unsigned char values.
unsigned char GetGreenUC(void) const
unsigned char GetAlphaUC(void) const
unsigned char GetBlueUC(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
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.
static const char label[]
const struct ncbi::grid::netcache::search::fields::SIZE size
#define ID_TREE_FONT_COLOR
#define m_LABEL_FONT_SIZE_CHOICE
#define ID_LABEL_FONT_CHOICE
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