if (!panel)
return false;
- wxFont guiFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+ wxFont guiFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
#ifdef __WXMSW__
wxFont *boringFont =
int w,h;
GetSize( &w, &h );
- wxBrush backGround( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE), wxSOLID );
+ wxBrush backGround( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID );
//dc.SetBrush( *wxLIGHT_GREY_BRUSH );
dc.SetBrush( backGround );
dc.SetPen( *wxTRANSPARENT_PEN );
// get the parent of this item (may return NULL if root)
wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
-#if WXWIN_COMPATIBILITY_2_2
- // deprecated: Use GetItemParent instead.
- wxTreeItemId GetParent(const wxTreeItemId& item) const
- { return GetItemParent( item ); }
-
- // Expose the base class method hidden by the one above.
- wxWindow *GetParent() const { return wxControl::GetParent(); }
-#endif // WXWIN_COMPATIBILITY_2_2
-
// for this enumeration function you must pass in a "cookie" parameter
// which is opaque for the application but is necessary for the library
// to make these functions reentrant (i.e. allow more than one
public:
#ifdef __WXUNIVERSAL__
// in wxUniversal we want to use the theme standard colours instead of the
- // system ones, otherwuse wxSystemSettings is just the same as
+ // system ones, otherwise wxSystemSettings is just the same as
// wxSystemSettingsNative
static wxColour GetColour(wxSystemColour index);
#endif // __WXUNIVERSAL__
// Value
static wxSystemScreenType ms_screen;
-
+#if WXWIN_COMPATIBILITY_2_4
// the backwards compatible versions of wxSystemSettingsNative functions,
// don't use these methods in the new code!
- static wxColour GetSystemColour(int index)
- { return GetColour((wxSystemColour)index); }
- static wxFont GetSystemFont(int index)
- { return GetFont((wxSystemFont)index); }
- static int GetSystemMetric(int index)
- { return GetMetric((wxSystemMetric)index); }
+ wxDEPRECATED(static wxColour GetSystemColour(int index));
+ wxDEPRECATED(static wxFont GetSystemFont(int index));
+ wxDEPRECATED(static int GetSystemMetric(int index));
+#endif
};
#endif
#if WXWIN_COMPATIBILITY_2_2
// for compatibility only, don't use
- int GetCode() const { return m_evtKey.GetKeyCode(); }
+ wxDEPRECATED( int GetCode() const);
#endif // WXWIN_COMPATIBILITY_2_2
private:
// Format a message on the standard error (UNIX) or the debugging
// stream (Windows)
-WXDLLIMPEXP_BASE void wxDebugMsg(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1;
+wxDEPRECATED( WXDLLIMPEXP_BASE void wxDebugMsg(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1 );
// Non-fatal error (continues)
WXDLLIMPEXP_DATA_BASE(extern const wxChar*) wxInternalErrorStr;
-WXDLLIMPEXP_BASE void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr);
+wxDEPRECATED( WXDLLIMPEXP_BASE void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr) );
// Fatal error (exits)
WXDLLIMPEXP_DATA_BASE(extern const wxChar*) wxFatalErrorStr;
-WXDLLIMPEXP_BASE void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr);
+wxDEPRECATED( WXDLLIMPEXP_BASE void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr) );
#endif // WXWIN_COMPATIBILITY_2_2
// Author: David Elliott
// Modified by:
// Created: 2002/12/15
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: 2002 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
void wxDialog::Init()
{
m_isModal = false;
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
}
bool wxDialog::Create(wxWindow *parent, wxWindowID winid,
event.Veto();
static wxList closing;
-
+
if ( closing.Member(this) )
{
wxLogDebug(wxT("WARNING: Attempting to recursively call Close for dialog"));
return;
}
-
+
closing.Append(this);
-
+
wxLogTrace(wxTRACE_COCOA,wxT("Sending Cancel Event"));
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this );
void wxDialog::OnApply(wxCommandEvent& event)
{
- if (Validate())
- TransferDataFromWindow();
- // TODO probably need to disable the Apply button until things change again
+ if (Validate())
+ TransferDataFromWindow();
+ // TODO probably need to disable the Apply button until things change again
}
void wxDialog::OnCancel(wxCommandEvent& event)
wxLibraries::~wxLibraries()
{
- wxNode *node = m_loaded.First();
+ wxNode *node = m_loaded.GetFirst();
while (node) {
- wxLibrary *lib = (wxLibrary *)node->Data();
+ wxLibrary *lib = (wxLibrary *)node->GetData();
delete lib;
- node = node->Next();
+ node = node->GetNext();
}
}
wxNode *node = m_loaded.Find(name.GetData());
if (node != NULL)
- return ((wxLibrary *)node->Data());
+ return ((wxLibrary *)node->GetData());
// If DLL shares data, this is necessary.
old_sm_first = wxClassInfo::sm_first;
wxObject *wxLibraries::CreateObject(const wxString& path)
{
- wxNode *node = m_loaded.First();
+ wxNode *node = m_loaded.GetFirst();
wxObject *obj;
while (node) {
- obj = ((wxLibrary *)node->Data())->CreateObject(path);
+ obj = ((wxLibrary *)node->GetData())->CreateObject(path);
if (obj)
return obj;
- node = node->Next();
+ node = node->GetNext();
}
return NULL;
}
ms_screen = screen;
}
+#if WXWIN_COMPATIBILITY_2_4
+
+wxColour wxSystemSettings::GetSystemColour(int index)
+{
+ return GetColour((wxSystemColour)index);
+}
+
+wxFont wxSystemSettings::GetSystemFont(int index)
+{
+ return GetFont((wxSystemFont)index);
+}
+
+int wxSystemSettings::GetSystemMetric(int index)
+{
+ return GetMetric((wxSystemMetric)index);
+}
+
+#endif // WXWIN_COMPATIBILITY_2_4
m_editCancelled = event.m_editCancelled;
}
+#if WXWIN_COMPATIBILITY_2_2
+
+int wxTreeEvent::GetCode() const
+{
+ return m_evtKey.GetKeyCode();
+}
+
+#endif // WXWIN_COMPATIBILITY_2_2
+
#endif // wxUSE_TREECTRL
// grey out fields if the grid is disabled
if( grid.IsEnabled() )
{
- if ( isSelected )
- {
- dc.SetBrush( wxBrush(grid.GetSelectionBackground(), wxSOLID) );
- }
- else
- {
- dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
- }
+ if ( isSelected )
+ {
+ dc.SetBrush( wxBrush(grid.GetSelectionBackground(), wxSOLID) );
+ }
+ else
+ {
+ dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
+ }
}
else
{
- dc.SetBrush(wxBrush(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
+ dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
}
dc.SetPen( *wxTRANSPARENT_PEN );
}
else
{
- dc.SetTextBackground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
- dc.SetTextForeground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT));
+ dc.SetTextBackground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+ dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
}
dc.SetFont( attr.GetFont() );
else
{
wxString tmp = params.BeforeFirst(_T(','));
- if ( !!tmp )
+ if ( !tmp.empty() )
{
long width;
if ( tmp.ToLong(&width) )
}
tmp = params.AfterFirst(_T(','));
- if ( !!tmp )
+ if ( !tmp.empty() )
{
long precision;
if ( tmp.ToLong(&precision) )
rect.SetY( 1 );
rect.SetWidth( client_width - 2 );
rect.SetHeight( client_height - 2 );
-
+
wxRendererNative::Get().DrawHeaderButton( this, dc, rect, 0 );
#else
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW),1, wxSOLID) );
rect.SetY( GetRowTop(row) + 1 );
rect.SetWidth( m_rowLabelWidth - 2 );
rect.SetHeight( GetRowHeight(row) - 2 );
-
+
CalcScrolledPosition( 0, rect.y, NULL, &rect.y );
-
+
wxWindowDC *win_dc = (wxWindowDC*) &dc;
wxRendererNative::Get().DrawHeaderButton( win_dc->m_owner, dc, rect, 0 );
return;
int colLeft = GetColLeft(col);
-
+
wxRect rect;
#ifdef __WXGTK__
rect.SetX( colLeft + 1 );
rect.SetY( 1 );
rect.SetWidth( GetColWidth(col) - 2 );
rect.SetHeight( m_colLabelHeight - 2 );
-
+
wxWindowDC *win_dc = (wxWindowDC*) &dc;
wxRendererNative::Get().DrawHeaderButton( win_dc->m_owner, dc, rect, 0 );
const wxString& rsStr
)
: wxOwnerDrawn( rsStr
- ,FALSE
+ ,false
)
{
//
wxSystemSettings vSettings;
- SetBackgroundColour(vSettings.GetSystemColour(wxSYS_COLOUR_WINDOW));
+ SetBackgroundColour(vSettings.GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(pParent->GetForegroundColour());
m_windowId = (vId == -1) ? (int)NewControlId() : vId;
);
if (m_hWnd == 0)
{
- return FALSE;
+ return false;
}
//
,nHeight
);
delete pTextFont;
- return TRUE;
+ return true;
} // end of wxListBox::Create
wxListBox::~wxListBox()
int N
) const
{
- wxCHECK_MSG( N >= 0 && N < m_nNumItems, FALSE,
+ wxCHECK_MSG( N >= 0 && N < m_nNumItems, false,
wxT("invalid index in wxListBox::Selected") );
LONG lItem;
//
// Some event we're not interested in
//
- return FALSE;
+ return false;
}
wxCommandEvent vEvent( eEvtType
,m_windowId
//
// Only owner-drawn control should receive this message
//
- wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), FALSE);
+ wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), false);
//
// The item may be -1 for an empty listbox
//
if (lItemID == -1L)
- return FALSE;
+ return false;
wxListBoxItem* pData = (wxListBoxItem*)PVOIDFROMMR( ::WinSendMsg( GetHwnd()
,LM_QUERYITEMHANDLE
)
);
- wxCHECK(pData, FALSE );
+ wxCHECK(pData, false );
wxDC vDc;
wxRect vRect( wxPoint( pDrawStruct->rclItem.xLeft
// For now we don't care about anything else
// just ignore the entire message!
//
- return TRUE;
+ return true;
}
}
return pData->OnDrawItem( vDc
fnd = wxXmlFindFirst;
else
fnd = filemask;
- while (!!fnd)
+ while (!fnd.empty())
{
// NB: Load() accepts both filenames and URLs (should probably be
// changed to filenames only, but embedded resources currently