Fixed wxCheckBox on wxGTK (SetLabel called before widget creation),
wxListBox::GetSelection returning -1 now doesn't assert; wxProp improvements for wxGTK; parser.y includes <io.h> under VC++ to eliminate 'read' warning git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,40 +32,6 @@ wxDebugStreamBuf it might help, but I don't know how to do that -
|
|||||||
I've redefined 'new' throughout as WXDEBUG_NEW (which is itself
|
I've redefined 'new' throughout as WXDEBUG_NEW (which is itself
|
||||||
defined as the 3-argument operator).
|
defined as the 3-argument operator).
|
||||||
|
|
||||||
Config/registry classes
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Problems with Karsten's/Vadim's existing AppConfig classes:
|
|
||||||
|
|
||||||
- use char* a lot instead of wxString
|
|
||||||
- rather hard to understand
|
|
||||||
- will need fairly substantial rewrite
|
|
||||||
- no native .ini functions (?) for guaranteed Windows
|
|
||||||
compatibility
|
|
||||||
- new wxWin docs required
|
|
||||||
|
|
||||||
Good things:
|
|
||||||
|
|
||||||
- exists!
|
|
||||||
- FileConfig independent of OS
|
|
||||||
- specifying a base class that will meet nearly all needs for
|
|
||||||
derived classes
|
|
||||||
- enumerator
|
|
||||||
|
|
||||||
Other features we should probably have:
|
|
||||||
|
|
||||||
- ability to specify vendor name/app name in constructor
|
|
||||||
- under Windows, ability to read/write all areas of registry
|
|
||||||
as an option
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- rewrite AppConfig
|
|
||||||
- start from own CRegistry class
|
|
||||||
- take elements from both
|
|
||||||
- do the Windows stuff, let someone else write/adapt the
|
|
||||||
non-Windows classes
|
|
||||||
|
|
||||||
Owner-draw menus
|
Owner-draw menus
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@@ -33,9 +33,10 @@ Update manual.
|
|||||||
wxTaskBarIcon DONE
|
wxTaskBarIcon DONE
|
||||||
wxMsgCatalog etc.
|
wxMsgCatalog etc.
|
||||||
wxLog
|
wxLog
|
||||||
wxConfig, wxRegKey
|
wxConfig DONE
|
||||||
|
wxRegKey
|
||||||
wxTabCtrl DONE
|
wxTabCtrl DONE
|
||||||
wxNotebook
|
wxNotebook DONE (some more explanation required)
|
||||||
wxWave DONE
|
wxWave DONE
|
||||||
wxJoystick DONE
|
wxJoystick DONE
|
||||||
wxStatusBar95 and wxFrame status bar functions
|
wxStatusBar95 and wxFrame status bar functions
|
||||||
@@ -44,8 +45,8 @@ Update manual.
|
|||||||
wxHelpController classes DONE (except for Unix ones)
|
wxHelpController classes DONE (except for Unix ones)
|
||||||
wxString PARTLY DONE
|
wxString PARTLY DONE
|
||||||
Drag and drop (change API if required, e.g. const).
|
Drag and drop (change API if required, e.g. const).
|
||||||
wxCheckListBox
|
wxCheckListBox DONE
|
||||||
wxAcceleratorTable
|
wxAcceleratorTable DONE
|
||||||
wxBaseArray, other arrays
|
wxBaseArray, other arrays
|
||||||
(wxOwnerDrawn)
|
(wxOwnerDrawn)
|
||||||
Document the include file for each class
|
Document the include file for each class
|
||||||
@@ -63,8 +64,6 @@ objects.
|
|||||||
|
|
||||||
More wxSystemSettings (see comment in settings.cpp).
|
More wxSystemSettings (see comment in settings.cpp).
|
||||||
|
|
||||||
wxSocket integration.
|
|
||||||
|
|
||||||
Convert remaining utilities e.g. (GLCanvas; wxGraphLayout) and samples
|
Convert remaining utilities e.g. (GLCanvas; wxGraphLayout) and samples
|
||||||
|
|
||||||
Check TODO entries.
|
Check TODO entries.
|
||||||
@@ -79,7 +78,7 @@ for all controls, at least in WXWIN_COMPATIBLE mode, but
|
|||||||
retain (Set)Callback for all compilations. This is following a
|
retain (Set)Callback for all compilations. This is following a
|
||||||
panicky response to losing callbacks.
|
panicky response to losing callbacks.
|
||||||
|
|
||||||
Merge dib.cpp, dibutils.cpp.
|
Merge dib.cpp, dibutils.cpp (see also some DIB code in bitmap.cpp).
|
||||||
|
|
||||||
Add a wxTabCtrl sample.
|
Add a wxTabCtrl sample.
|
||||||
|
|
||||||
@@ -151,7 +150,9 @@ substituting static text for obsolete labels).
|
|||||||
|
|
||||||
Improve and expand wxSizer classes.
|
Improve and expand wxSizer classes.
|
||||||
|
|
||||||
Write more validators.
|
Write more validators. Also, how do they work if loading the
|
||||||
|
dialog from a .wxr? Could call SetValidator from within
|
||||||
|
InitDialog for all controls, then call TransferDataToWindow.
|
||||||
|
|
||||||
Classes for file/OS utility functions.
|
Classes for file/OS utility functions.
|
||||||
|
|
||||||
|
@@ -4,6 +4,9 @@ static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90";
|
|||||||
#define YYBYACC 1
|
#define YYBYACC 1
|
||||||
#line 2 "parser.y"
|
#line 2 "parser.y"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <io.h>
|
||||||
|
#endif
|
||||||
#include "wx/expr.h"
|
#include "wx/expr.h"
|
||||||
|
|
||||||
#ifndef __EXTERN_C__
|
#ifndef __EXTERN_C__
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
%{
|
%{
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <io.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/expr.h"
|
#include "wx/expr.h"
|
||||||
|
|
||||||
#ifndef __EXTERN_C__
|
#ifndef __EXTERN_C__
|
||||||
|
@@ -56,7 +56,7 @@ bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
|
|
||||||
SetValidator( validator );
|
SetValidator( validator );
|
||||||
|
|
||||||
SetLabel( label );
|
wxControl::SetLabel( label );
|
||||||
|
|
||||||
m_widget = gtk_check_button_new_with_label( m_label );
|
m_widget = gtk_check_button_new_with_label( m_label );
|
||||||
|
|
||||||
|
@@ -234,7 +234,9 @@ int wxListBox::GetSelection(void) const
|
|||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxFAIL_MSG("wrong listbox index");
|
// No, I think it's reasonable to return -1 to indicate
|
||||||
|
// there is no selection. -- JACS
|
||||||
|
// wxFAIL_MSG("wrong listbox index");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
|
|
||||||
SetValidator( validator );
|
SetValidator( validator );
|
||||||
|
|
||||||
SetLabel( label );
|
wxControl::SetLabel( label );
|
||||||
|
|
||||||
m_widget = gtk_check_button_new_with_label( m_label );
|
m_widget = gtk_check_button_new_with_label( m_label );
|
||||||
|
|
||||||
|
@@ -234,7 +234,9 @@ int wxListBox::GetSelection(void) const
|
|||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxFAIL_MSG("wrong listbox index");
|
// No, I think it's reasonable to return -1 to indicate
|
||||||
|
// there is no selection. -- JACS
|
||||||
|
// wxFAIL_MSG("wrong listbox index");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -150,10 +150,13 @@ bool wxResourceManager::Initialize()
|
|||||||
strcat(buf, "\\dialoged.ini");
|
strcat(buf, "\\dialoged.ini");
|
||||||
m_optionsResourceFilename = buf;
|
m_optionsResourceFilename = buf;
|
||||||
#elif defined(__WXGTK__)
|
#elif defined(__WXGTK__)
|
||||||
char buf[500];
|
/*
|
||||||
wxGetHomeDir(buf);
|
wxString buf;
|
||||||
strcat(buf, "/.dialogedrc");
|
wxGetHomeDir(&buf);
|
||||||
|
buf += "/.dialogedrc";
|
||||||
m_optionsResourceFilename = buf;
|
m_optionsResourceFilename = buf;
|
||||||
|
*/
|
||||||
|
m_optionsResourceFilename = ".dialoged.rc";
|
||||||
#else
|
#else
|
||||||
#error "Unsupported platform."
|
#error "Unsupported platform."
|
||||||
#endif
|
#endif
|
||||||
|
@@ -182,8 +182,11 @@ bool wxPropertyListView::UpdatePropertyDisplayInList(wxProperty *property)
|
|||||||
// UpdatePropertyList(FALSE);
|
// UpdatePropertyList(FALSE);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
// TODO: why is this necessary?
|
||||||
|
#ifdef __WXMSW__
|
||||||
if (currentlySelected > -1)
|
if (currentlySelected > -1)
|
||||||
propertyScrollingList->SetSelection(currentlySelected);
|
propertyScrollingList->SetSelection(currentlySelected);
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -952,7 +955,7 @@ bool wxPropertyListValidator::OnDisplayValue(wxProperty *property, wxPropertyLis
|
|||||||
// view->GetValueText()->Show(TRUE);
|
// view->GetValueText()->Show(TRUE);
|
||||||
wxString str(property->GetValue().GetStringRepresentation());
|
wxString str(property->GetValue().GetStringRepresentation());
|
||||||
|
|
||||||
view->GetValueText()->SetValue(str.GetData());
|
view->GetValueText()->SetValue(str);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1159,8 +1162,12 @@ bool wxBoolListValidator::OnDisplayValue(wxProperty *property, wxPropertyListVie
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
wxString str(property->GetValue().GetStringRepresentation());
|
wxString str(property->GetValue().GetStringRepresentation());
|
||||||
|
|
||||||
view->GetValueText()->SetValue(str.GetData());
|
view->GetValueText()->SetValue(str);
|
||||||
view->GetValueList()->SetStringSelection(str.GetData());
|
|
||||||
|
if (view->GetValueList()->IsShown())
|
||||||
|
{
|
||||||
|
view->GetValueList()->SetStringSelection(str);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1274,10 +1281,10 @@ bool wxStringListValidator::OnDisplayValue(wxProperty *property, wxPropertyListV
|
|||||||
if (!view->GetValueText())
|
if (!view->GetValueText())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
wxString str(property->GetValue().GetStringRepresentation());
|
wxString str(property->GetValue().GetStringRepresentation());
|
||||||
view->GetValueText()->SetValue(str.GetData());
|
view->GetValueText()->SetValue(str);
|
||||||
if (strings && view->GetValueList() && view->GetValueList()->Number() > 0)
|
if (strings && view->GetValueList() && view->GetValueList()->IsShown() && view->GetValueList()->Number() > 0)
|
||||||
{
|
{
|
||||||
view->GetValueList()->SetStringSelection(str.GetData());
|
view->GetValueList()->SetStringSelection(str);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1611,7 +1618,7 @@ bool wxListOfStringsListValidator::OnDisplayValue(wxProperty *property, wxProper
|
|||||||
if (!view->GetValueText())
|
if (!view->GetValueText())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
wxString str(property->GetValue().GetStringRepresentation());
|
wxString str(property->GetValue().GetStringRepresentation());
|
||||||
view->GetValueText()->SetValue(str.GetData());
|
view->GetValueText()->SetValue(str);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user