#include "wx/log.h"
#include "wx/app.h"
#include "wx/utils.h"
+ #include "wx/arrstr.h"
#endif //WX_PRECOMP
-#include "wx/arrstr.h"
-
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/file.h"
wxString wxExpandEnvVars(const wxString& str)
{
wxString strResult;
- strResult.Alloc(str.Len());
+ strResult.Alloc(str.length());
size_t m;
- for ( size_t n = 0; n < str.Len(); n++ ) {
+ for ( size_t n = 0; n < str.length(); n++ ) {
switch ( str[n] ) {
#ifdef __WXMSW__
case wxT('%'):
bracket = Bracket_Windows;
else
#endif //WINDOWS
- if ( n == str.Len() - 1 ) {
+ if ( n == str.length() - 1 ) {
bracket = Bracket_None;
}
else {
m = n + 1;
- while ( m < str.Len() && (wxIsalnum(str[m]) || str[m] == wxT('_')) )
+ while ( m < str.length() && (wxIsalnum(str[m]) || str[m] == wxT('_')) )
m++;
wxString strVarName(str.c_str() + n + 1, m - n - 1);
// check the closing bracket
if ( bracket != Bracket_None ) {
- if ( m == str.Len() || str[m] != (wxChar)bracket ) {
+ if ( m == str.length() || str[m] != (wxChar)bracket ) {
// under MSW it's common to have '%' characters in the registry
// and it's annoying to have warnings about them each time, so
// ignroe them silently if they are not used for env vars
case '\\':
// backslash can be used to suppress special meaning of % and $
- if ( n != str.Len() - 1 &&
+ if ( n != str.length() - 1 &&
(str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) {
strResult += str[++n];
#if wxUSE_CHECKLISTBOX
#include "wx/checklst.h"
-#include "wx/arrstr.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/arrstr.h"
+#endif
#include "wx/mac/uma.h"
~wxMacDataBrowserCheckListControl();
virtual wxMacListBoxItem* CreateItem();
-
+
virtual bool MacIsChecked(unsigned int n) const;
virtual void MacCheck(unsigned int n, bool bCheck = true);
};
MacPostControlCreate(pos,size);
- InsertItems( n , choices , 0 );
+ InsertItems( n , choices , 0 );
// Needed because it is a wxControlWithItems
SetBestSize( size );
}
}
-wxMacCheckListControl* wxCheckListBox::GetPeer() const
-{
- return dynamic_cast<wxMacCheckListControl*>(m_peer);
+wxMacCheckListControl* wxCheckListBox::GetPeer() const
+{
+ return dynamic_cast<wxMacCheckListControl*>(m_peer);
}
const short kCheckboxColumnId = 1026;
kDataBrowserPropertyIsMutable
| kDataBrowserTableViewSelectionColumn
| kDataBrowserDefaultPropertyFlags;
-
+
err = AddColumn( &columnDesc, 0 );
verify_noerr( err );
}
wxMacDataBrowserCheckListControl::~wxMacDataBrowserCheckListControl()
{
-
+
}
class wxMacCheckListBoxItem : public wxMacListBoxItem
{
m_isChecked = false;
}
-
+
~wxMacCheckListBoxItem()
{
}
-
+
virtual OSStatus GetSetData( wxMacDataItemBrowserControl *owner ,
DataBrowserPropertyID property,
DataBrowserItemDataRef itemData,
- bool changeValue )
+ bool changeValue )
{
OSStatus err = errDataBrowserPropertyNotSupported;
wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, checklist->GetId() );
event.SetInt( owner->GetLineFromItem( this ) );
event.SetEventObject( checklist );
- checklist->GetEventHandler()->ProcessEvent( event );
+ checklist->GetEventHandler()->ProcessEvent( event );
}
break;
return err;
}
- void Check( bool check )
+ void Check( bool check )
{
m_isChecked = check;
}
- bool IsChecked() const
+ bool IsChecked() const
{
- return m_isChecked;
+ return m_isChecked;
}
protected :
bool m_isChecked;
};
-wxMacListBoxItem* wxMacDataBrowserCheckListControl::CreateItem()
+wxMacListBoxItem* wxMacDataBrowserCheckListControl::CreateItem()
{
return new wxMacCheckListBoxItem();
}
-void wxMacDataBrowserCheckListControl::MacCheck( unsigned int n, bool bCheck)
+void wxMacDataBrowserCheckListControl::MacCheck( unsigned int n, bool bCheck)
{
wxMacCheckListBoxItem* item = dynamic_cast<wxMacCheckListBoxItem*>( GetItemFromLine( n) );
item->Check( bCheck);
UpdateItem(wxMacDataBrowserRootContainer, item , kCheckboxColumnId);
}
-bool wxMacDataBrowserCheckListControl::MacIsChecked( unsigned int n) const
+bool wxMacDataBrowserCheckListControl::MacIsChecked( unsigned int n) const
{
wxMacCheckListBoxItem * item = dynamic_cast<wxMacCheckListBoxItem*>( GetItemFromLine( n ) );
- return item->IsChecked();
+ return item->IsChecked();
}