if (property == (wxProperty *)m_propertyScrollingList->wxListBox::GetClientData(i))
return i;
}
- return -1;
+ return wxNOT_FOUND;
}
wxString wxPropertyListView::MakeNameValueString(wxString name, wxString value)
if (select)
{
int sel = FindListIndexForProperty(property);
- if (sel > -1)
+ if (sel != wxNOT_FOUND)
m_propertyScrollingList->SetSelection(sel);
}
return true;
void wxPropertyListView::OnPropertySelect(wxCommandEvent& WXUNUSED(event))
{
int sel = m_propertyScrollingList->GetSelection();
- if (sel > -1)
+ if (sel != wxNOT_FOUND)
{
wxProperty *newSel = (wxProperty *)m_propertyScrollingList->wxListBox::GetClientData(sel);
if (newSel && newSel != m_currentProperty)
if (!panel)
return false;
- wxFont guiFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+ wxFont guiFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
#ifdef __WXMSW__
wxFont *boringFont =
}
m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, wxEmptyString,
- wxDefaultPosition, wxSize(wxDefaultSize.x, smallButtonSize.y), wxPROCESS_ENTER);
+ wxDefaultPosition, wxSize(wxDefaultCoord, smallButtonSize.y), wxPROCESS_ENTER);
m_valueText->Disable();
topsizer->Add( m_valueText, 1, wxALL | wxEXPAND, buttonborder );
m_middleSizer = new wxBoxSizer( wxVERTICAL );
- m_valueList = new wxListBox(panel, wxID_PROP_VALUE_SELECT, wxDefaultPosition, wxSize(wxDefaultSize.x, 60));
+ m_valueList = new wxListBox(panel, wxID_PROP_VALUE_SELECT, wxDefaultPosition, wxSize(wxDefaultCoord, 60));
m_valueList->Show(false);
m_propertyScrollingList = new wxListBox(panel, wxID_PROP_SELECT, wxDefaultPosition, wxSize(100, 100));
return;
wxChar *s = property->GetValue().StringValue();
- int r = 0;
- int g = 0;
- int b = 0;
+ unsigned char r = 0;
+ unsigned char g = 0;
+ unsigned char b = 0;
if (s)
{
- r = wxHexToDec(s);
- g = wxHexToDec(s+2);
- b = wxHexToDec(s+4);
+ r = (unsigned char)wxHexToDec(s);
+ g = (unsigned char)wxHexToDec(s+2);
+ b = (unsigned char)wxHexToDec(s+4);
}
wxColour col(r,g,b);
for (int i = 0; i < 16; i++)
{
- wxColour colour(i*16, i*16, i*16);
+ wxColour colour((unsigned char)(i*16),
+ (unsigned char)(i*16),
+ (unsigned char)(i*16));
data.SetCustomColour(i, colour);
}
dialog->m_stringText = new wxPropertyStringListEditorText(dialog,
wxID_PROP_SL_TEXT, wxEmptyString, wxPoint(5, 240),
- wxSize(300, wxDefaultSize.y), wxPROCESS_ENTER);
+ wxSize(300, wxDefaultCoord), wxPROCESS_ENTER);
dialog->m_stringText->Disable();
wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, wxT("Add"), wxDefaultPosition, wxSize(largeButtonWidth, largeButtonHeight));
void wxPropertyStringListEditorDialog::OnStrings(wxCommandEvent& WXUNUSED(event))
{
int sel = m_listBox->GetSelection();
- if (sel > -1)
+ if (sel != wxNOT_FOUND)
{
m_currentSelection = sel;
void wxPropertyStringListEditorDialog::OnDelete(wxCommandEvent& WXUNUSED(event))
{
int sel = m_listBox->GetSelection();
- if (sel == -1)
+ if (sel == wxNOT_FOUND)
return;
wxNode *node = (wxNode *)m_listBox->wxListBox::GetClientData(sel);