BC++ updates, propery form fix, dialog fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -181,7 +181,7 @@ $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
|
||||
$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
|
||||
-erase $(LIBTARGET)
|
||||
-erase $(WXLIBDIR)\wx.dll
|
||||
$(LINK) $(LINK_FLAGS) /L$(WXLIBDIR) /v @&&!
|
||||
$(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
|
||||
c0d32.obj $(OBJECTS)
|
||||
$(WXLIBDIR)\wx
|
||||
nul
|
||||
|
@@ -45,7 +45,8 @@ Default constructor.
|
||||
|
||||
Copy constructor.
|
||||
|
||||
\func{}{wxVariant}{\param{const char*}{ value}, \param{const wxString\& }{name = ``"}}\\
|
||||
\func{}{wxVariant}{\param{const char*}{ value}, \param{const wxString\& }{name = ``"}}
|
||||
|
||||
\func{}{wxVariant}{\param{const wxString\&}{ value}, \param{const wxString\& }{name = ``"}}
|
||||
|
||||
Construction from a string value.
|
||||
|
@@ -281,6 +281,8 @@ public:
|
||||
|
||||
// Extend event processing to search the view's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
void SetView(wxPropertyFormView* view) { m_view = view; }
|
||||
wxPropertyFormView* GetView() const { return m_view; }
|
||||
|
||||
private:
|
||||
wxPropertyFormView* m_view;
|
||||
|
@@ -33,17 +33,17 @@
|
||||
|
||||
|
||||
/*
|
||||
* Property view
|
||||
*/
|
||||
* Property view
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormView, wxPropertyView)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPropertyFormView, wxPropertyView)
|
||||
EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk)
|
||||
EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel)
|
||||
EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp)
|
||||
EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert)
|
||||
EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate)
|
||||
EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk)
|
||||
EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel)
|
||||
EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp)
|
||||
EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert)
|
||||
EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
bool wxPropertyFormView::sm_dialogCancelled = FALSE;
|
||||
@@ -69,8 +69,8 @@ void wxPropertyFormView::ShowView(wxPropertySheet *ps, wxWindow *panel)
|
||||
m_propertySheet = ps;
|
||||
|
||||
AssociatePanel(panel);
|
||||
// CreateControls();
|
||||
// UpdatePropertyList();
|
||||
// CreateControls();
|
||||
// UpdatePropertyList();
|
||||
}
|
||||
|
||||
// Update this view of the viewed object, called e.g. by
|
||||
@@ -164,6 +164,10 @@ bool wxPropertyFormView::AssociateNames(void)
|
||||
|
||||
bool wxPropertyFormView::OnClose(void)
|
||||
{
|
||||
if (m_propertyWindow->IsKindOf(CLASSINFO(wxPropertyFormPanel)))
|
||||
{
|
||||
((wxPropertyFormPanel*)m_propertyWindow)->SetView(NULL);
|
||||
}
|
||||
delete this;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -281,23 +285,23 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item)
|
||||
}
|
||||
|
||||
/*
|
||||
* Property form dialog box
|
||||
*/
|
||||
* Property form dialog box
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormDialog, wxDialog)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPropertyFormDialog, wxDialog)
|
||||
EVT_CLOSE(wxPropertyFormDialog::OnCloseWindow)
|
||||
EVT_CLOSE(wxPropertyFormDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPropertyFormDialog::wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name):
|
||||
wxDialog(parent, -1, title, pos, size, style, name)
|
||||
wxDialog(parent, -1, title, pos, size, style, name)
|
||||
{
|
||||
m_view = v;
|
||||
m_view->AssociatePanel(this);
|
||||
m_view->SetManagedWindow(this);
|
||||
// SetAutoLayout(TRUE);
|
||||
// SetAutoLayout(TRUE);
|
||||
}
|
||||
|
||||
void wxPropertyFormDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
@@ -334,8 +338,8 @@ bool wxPropertyFormDialog::ProcessEvent(wxEvent& event)
|
||||
|
||||
|
||||
/*
|
||||
* Property form panel
|
||||
*/
|
||||
* Property form panel
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormPanel, wxPanel)
|
||||
|
||||
@@ -359,13 +363,13 @@ bool wxPropertyFormPanel::ProcessEvent(wxEvent& event)
|
||||
}
|
||||
|
||||
/*
|
||||
* Property frame
|
||||
*/
|
||||
* Property frame
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormFrame, wxFrame)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPropertyFormFrame, wxFrame)
|
||||
EVT_CLOSE(wxPropertyFormFrame::OnCloseWindow)
|
||||
EVT_CLOSE(wxPropertyFormFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void wxPropertyFormFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
@@ -394,16 +398,16 @@ bool wxPropertyFormFrame::Initialize(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Property form specific validator
|
||||
*/
|
||||
/*
|
||||
* Property form specific validator
|
||||
*/
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxPropertyFormValidator, wxPropertyValidator)
|
||||
|
||||
|
||||
/*
|
||||
* Default validators
|
||||
*/
|
||||
* Default validators
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxRealFormValidator, wxPropertyFormValidator)
|
||||
|
||||
@@ -619,7 +623,7 @@ bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator)
|
||||
|
||||
wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags):
|
||||
wxPropertyFormValidator(flags)
|
||||
wxPropertyFormValidator(flags)
|
||||
{
|
||||
m_strings = list;
|
||||
}
|
||||
@@ -672,7 +676,7 @@ bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyForm
|
||||
if (lbox->GetSelection() > -1)
|
||||
property->GetValue() = lbox->GetStringSelection();
|
||||
}
|
||||
/*
|
||||
/*
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxRadioBox)))
|
||||
{
|
||||
wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow;
|
||||
@@ -680,7 +684,7 @@ bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyForm
|
||||
if ((n = rbox->GetSelection()) > -1)
|
||||
property->GetValue() = rbox->GetString(n);
|
||||
}
|
||||
*/
|
||||
*/
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice)))
|
||||
{
|
||||
wxChoice *choice = (wxChoice *)m_propertyWindow;
|
||||
@@ -720,13 +724,13 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
|
||||
}
|
||||
lbox->SetStringSelection(property->GetValue().StringValue());
|
||||
}
|
||||
/*
|
||||
/*
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxRadioBox)))
|
||||
{
|
||||
wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow;
|
||||
rbox->SetStringSelection(property->GetValue().StringValue());
|
||||
}
|
||||
*/
|
||||
*/
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice)))
|
||||
{
|
||||
wxChoice *choice = (wxChoice *)m_propertyWindow;
|
||||
|
@@ -329,14 +329,16 @@ void wxDialog::DoShowModal()
|
||||
|
||||
wxWindow *parent = GetParent();
|
||||
|
||||
wxWindow* oldFocus = m_oldFocus;
|
||||
|
||||
// inside this block, all app windows are disabled
|
||||
{
|
||||
wxWindowDisabler wd(this);
|
||||
|
||||
// remember where the focus was
|
||||
if ( !m_oldFocus )
|
||||
if ( !oldFocus )
|
||||
{
|
||||
m_oldFocus = parent;
|
||||
oldFocus = parent;
|
||||
}
|
||||
|
||||
// enter the modal loop
|
||||
@@ -360,9 +362,12 @@ void wxDialog::DoShowModal()
|
||||
#endif // __WIN32__
|
||||
|
||||
// and restore focus
|
||||
if ( m_oldFocus && (m_oldFocus != this) )
|
||||
// Note that this code MUST NOT access the dialog object's data
|
||||
// in case the object has been deleted (which will be the case
|
||||
// for a modal dialog that has been destroyed before calling EndModal).
|
||||
if ( oldFocus && (oldFocus != this) )
|
||||
{
|
||||
m_oldFocus->SetFocus();
|
||||
oldFocus->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -361,7 +361,7 @@ $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
|
||||
$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
|
||||
-erase $(LIBTARGET)
|
||||
-erase $(WXLIBDIR)\wx.dll
|
||||
$(LINK) $(LINK_FLAGS) /L$(WXLIBDIR) /v @&&!
|
||||
$(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
|
||||
c0d32.obj $(OBJECTS)
|
||||
$(WXLIBDIR)\wx
|
||||
nul
|
||||
|
Reference in New Issue
Block a user