// Set this one as the default button both for wxWindows and Windows
//
wxWindow* pWinOldDefault = pParent->SetDefaultItem(this);
- UpdateDefaultStyle( this
- ,pWinOldDefault
- );
+
+ SetDefaultStyle( wxDynamicCast(pWinOldDefault, wxButton)
+ ,FALSE
+ );
+ SetDefaultStyle( this
+ ,TRUE
+ );
} // end of wxButton::SetDefault
void wxButton::SetTmpDefault()
wxCHECK_RET( pParent, _T("button without parent?") );
wxWindow* pWinOldDefault = pParent->GetDefaultItem();
+
pParent->SetTmpDefaultItem(this);
- if (pWinOldDefault != this)
- {
- UpdateDefaultStyle( this
- ,pWinOldDefault
- );
- }
- //else: no styles to update
+ SetDefaultStyle( wxDynamicCast(pWinOldDefault, wxButton)
+ ,FALSE
+ );
+ SetDefaultStyle( this
+ ,TRUE
+ );
} // end of wxButton::SetTmpDefault
void wxButton::UnsetTmpDefault()
wxWindow* pWinOldDefault = pParent->GetDefaultItem();
- if (pWinOldDefault != this)
- {
- UpdateDefaultStyle( pWinOldDefault
- ,this
- );
- }
- //else: we had been default before anyhow
+ SetDefaultStyle( this
+ ,FALSE
+ );
+ SetDefaultStyle( wxDynamicCast(pWinOldDefault, wxButton)
+ ,TRUE
+ );
} // end of wxButton::UnsetTmpDefault
-void wxButton::UpdateDefaultStyle(
- wxWindow* pWinDefault
-, wxWindow* pWinOldDefault)
+void wxButton::SetDefaultStyle(
+ wxButton* pBtn
+, bool bOn
+)
{
- wxButton* pBtnOldDefault = wxDynamicCast(pWinOldDefault, wxButton);
long lStyle;
+ //
+ // We may be called with NULL pointer -- simpler to do the check here than
+ // in the caller which does wxDynamicCast()
+ //
+ if (!pBtn)
+ return;
- if ( pBtnOldDefault && pBtnOldDefault != pWinDefault )
+ //
+ // First, let DefDlgProc() know about the new default button
+ //
+ if (bOn)
+ {
+ if (!wxTheApp->IsActive())
+ return;
+
+ //
+ // In OS/2 the dialog/panel doesn't really know it has a default
+ // button, the default button simply has that style. We'll just
+ // simulate by setting focus to it
+ //
+ pBtn->SetFocus();
+ }
+ lStyle = ::WinQueryWindowULong(GetHwndOf(pBtn), QWL_STYLE);
+ if (!(lStyle & BS_DEFAULT) == bOn)
{
- lStyle = ::WinQueryWindowULong(GetHwndOf(pBtnOldDefault), QWL_STYLE);
if ((lStyle & BS_USERBUTTON) != BS_USERBUTTON)
{
- lStyle &= ~BS_DEFAULT;
- ::WinSetWindowULong(GetHwndOf(pBtnOldDefault), QWL_STYLE, lStyle);
+ if (bOn)
+ lStyle | BS_DEFAULT;
+ else
+ lStyle &= ~BS_DEFAULT;
+ ::WinSetWindowULong(GetHwndOf(pBtn), QWL_STYLE, lStyle);
}
else
{
- // redraw the button - it will notice itself that it's not the
+ //
+ // Redraw the button - it will notice itself that it's not the
// default one any longer
- pBtnOldDefault->Refresh();
- }
- }
-
- wxButton* pBtnDefault = wxDynamicCast(pWinDefault, wxButton);
-
- if (pBtnDefault)
- {
- lStyle = ::WinQueryWindowULong(GetHwndOf(pBtnDefault), QWL_STYLE);
- if ((lStyle & BS_USERBUTTON) != BS_USERBUTTON)
- {
- lStyle != BS_DEFAULT;
- ::WinSetWindowULong(GetHwndOf(pBtnDefault), QWL_STYLE, lStyle);
+ //
+ pBtn->Refresh();
}
}
} // end of wxButton::UpdateDefaultStyle
m_bMouseInWindow = FALSE;
m_bLastKeydownProcessed = FALSE;
m_bIsActivePage = TRUE;
+ m_pChildrenDisabled = NULL;
//
// wxWnd
//
wxRemoveHandleAssociation(this);
}
+ delete m_pChildrenDisabled;
} // end of wxWindowOS2::~wxWindowOS2
// real construction (Init() must have been called before!)
// set in those class create procs. PM's basic windows styles are
// very limited.
//
- ulCreateFlags |= WS_VISIBLE | OS2GetCreateWindowFlags(&dwExStyle);
+ ulCreateFlags |= OS2GetCreateWindowFlags(&dwExStyle);
#ifdef __WXUNIVERSAL__
#endif // !wxUniversal
if (lStyle & wxPOPUP_WINDOW)
{
- // a popup window floats on top of everything
- // it is also created hidden as other top level windows
ulCreateFlags &= ~WS_VISIBLE;
m_isShown = FALSE;
}
+ else
+ {
+ ulCreateFlags |= WS_VISIBLE;
+ }
//
// Generic OS/2 Windows have no Control Data but other classes
{
wxWindow* pChild = pNode->GetData();
- pChild->Enable(bEnable);
+ if (bEnable)
+ {
+ //
+ // Enable the child back unless it had been disabled before us
+ //
+ if (!m_pChildrenDisabled || !m_pChildrenDisabled->Find(pChild))
+ pChild->Enable();
+ }
+ else // we're being disabled
+ {
+ if (pChild->IsEnabled())
+ {
+ //
+ // Disable it as children shouldn't stay enabled while the
+ // parent is not
+ //
+ pChild->Disable();
+ }
+ else // child already disabled, remember it
+ {
+ //
+ // Have we created the list of disabled children already?
+ //
+ if (!m_pChildrenDisabled)
+ m_pChildrenDisabled = new wxWindowList;
+ m_pChildrenDisabled->Append(pChild);
+ }
+ }
pNode = pNode->GetNext();
}
+ if (bEnable && m_pChildrenDisabled)
+ {
+ //
+ // We don't need this list any more, don't keep unused memory
+ //
+ delete m_pChildrenDisabled;
+ m_pChildrenDisabled = NULL;
+ }
return TRUE;
} // end of wxWindowOS2::Enable
__ct__9wxAppBaseFv
;wxAppBase::OnInit()
OnInit__9wxAppBaseFv
- ;wxAppBase::DoInit()
- DoInit__9wxAppBaseFv
+ ;wxAppBase::CreateMessageOutput()
+ CreateMessageOutput__9wxAppBaseFv
;wxOnAssert(const char*,int,const char*,const char*)
wxOnAssert__FPCciN21
;wxAppBase::~wxAppBase()
ProcessPendingEvents__9wxAppBaseFv
;wxAppBase::OnCmdLineError(wxCmdLineParser&)
OnCmdLineError__9wxAppBaseFR15wxCmdLineParser
+ ;wxAppBase::CreateLogTarget()
+ CreateLogTarget__9wxAppBaseFv
;wxAppBase::SetActive(unsigned long,wxWindow*)
SetActive__9wxAppBaseFUlP8wxWindow
;From object file: ..\common\choiccmn.cpp
__vft9wxProcess8wxObject
;wxProcess::Open(const wxString&,int)
Open__9wxProcessFRC8wxStringi
+ ;wxProcess::IsErrorAvailable() const
+ IsErrorAvailable__9wxProcessCFv
wxEVT_END_PROCESS
;wxProcess::Init(wxEvtHandler*,int,int)
Init__9wxProcessFP12wxEvtHandleriT2
;wxProcess::~wxProcess()
__dt__9wxProcessFv
+ ;wxProcess::IsInputOpened() const
+ IsInputOpened__9wxProcessCFv
;wxConstructorForwxProcessEvent()
wxConstructorForwxProcessEvent__Fv
;wxProcess::sm_classwxProcess
OnTerminate__9wxProcessFiT1
;wxProcess::Detach()
Detach__9wxProcessFv
+ ;wxProcess::IsInputAvailable() const
+ IsInputAvailable__9wxProcessCFv
;From object file: ..\common\protocol.cpp
;PUBDEFs (Symbols available from object file):
;wxProtocol::wxProtocol()
Add__7wxSizerFP7wxSizeriN22P8wxObject
;wxSizer::Prepend(int,int,int,int,int,wxObject*)
Prepend__7wxSizerFiN41P8wxObject
- ;wxFlexGridSizer::AddGrowableCol(unsigned int)
- AddGrowableCol__15wxFlexGridSizerFUi
+ ;wxGridSizer::CalcRowsCols(int&,int&) const
+ CalcRowsCols__11wxGridSizerCFRiT1
;wxBoxSizer::wxBoxSizer(int)
__ct__10wxBoxSizerFi
+ ;wxFlexGridSizer::AddGrowableCol(unsigned int)
+ AddGrowableCol__15wxFlexGridSizerFUi
;wxSizerItem::IsSizer()
IsSizer__11wxSizerItemFv
;wxNotebookSizer::sm_classwxNotebookSizer
wxGetTopLevelParent__FP8wxWindow
;From object file: ..\common\wxchar.cpp
;PUBDEFs (Symbols available from object file):
+ ;wxVsnprintf_(char*,unsigned int,const char*,char*)
+ wxVsnprintf___FPcUiPCcT1
wcslen
;wxMB2WC(wchar_t*,const char*,unsigned int)
wxMB2WC__FPwPCcUi
- ;wxVsnprintf(char*,unsigned int,const char*,char*)
- wxVsnprintf__FPcUiPCcT1
+ ;wxSnprintf_(char*,unsigned int,const char*,...)
+ wxSnprintf___FPcUiPCce
;wxWC2MB(char*,const wchar_t*,unsigned int)
wxWC2MB__FPcPCwUi
- ;wxSnprintf(char*,unsigned int,const char*,...)
- wxSnprintf__FPcUiPCce
;wxOKlibc()
wxOKlibc__Fv
;From object file: ..\common\wxexpr.cpp
SetItem__17wxGenericListCtrlFR10wxListItem
;wxListLineData::SetItem(int,const wxListItem&)
SetItem__14wxListLineDataFiRC10wxListItem
- ;wxGenericListCtrl::SetImageList(wxGenericImageList*,int)
- SetImageList__17wxGenericListCtrlFP18wxGenericImageListi
;wxGenericListCtrl::SetColumnWidth(int,int)
SetColumnWidth__17wxGenericListCtrlFiT1
;wxGenericListCtrl::ScrollList(int,int)
SetItem__16wxListHeaderDataFRC10wxListItem
;wxListMainWindow::SetItemState(long,long,long)
SetItemState__16wxListMainWindowFlN21
- ;wxListMainWindow::SetImageList(wxGenericImageList*,int)
- SetImageList__16wxListMainWindowFP18wxGenericImageListi
+ ;wxListMainWindow::SetImageList(wxImageList*,int)
+ SetImageList__16wxListMainWindowFP11wxImageListi
;wxGenericListCtrl::SetColumn(int,wxListItem&)
SetColumn__17wxGenericListCtrlFiR10wxListItem
;wxListMainWindow::SetColumnWidth(int,int)
DeleteColumn__17wxGenericListCtrlFi
;wxListMainWindow::CacheLineData(unsigned int)
CacheLineData__16wxListMainWindowFUi
+ ;wxGenericListCtrl::AssignImageList(wxImageList*,int)
+ AssignImageList__17wxGenericListCtrlFP11wxImageListi
;wxGenericListCtrl::GetNextItem(long,int,int) const
GetNextItem__17wxGenericListCtrlCFliT2
;wxConstructorForwxListCtrl()
DrawImage__16wxListMainWindowFiP4wxDCN21
;wxListMainWindow::ChangeCurrent(unsigned int)
ChangeCurrent__16wxListMainWindowFUi
- ;wxGenericListCtrl::AssignImageList(wxGenericImageList*,int)
- AssignImageList__17wxGenericListCtrlFP18wxGenericImageListi
;wxGenericListCtrl::~wxGenericListCtrl()
__dt__17wxGenericListCtrlFv
wxEVT_COMMAND_LIST_KEY_DOWN
SetItem__16wxListMainWindowFR10wxListItem
;wxListItemData::SetItem(const wxListItem&)
SetItem__14wxListItemDataFRC10wxListItem
+ ;wxGenericListCtrl::SetImageList(wxImageList*,int)
+ SetImageList__17wxGenericListCtrlFP11wxImageListi
;wxListMainWindow::SetColumn(int,wxListItem&)
SetColumn__16wxListMainWindowFiR10wxListItem
;wxListLineDataArray::RemoveAt(unsigned int,unsigned int)
;PUBDEFs (Symbols available from object file):
;wxButton::Command(wxCommandEvent&)
Command__8wxButtonFR14wxCommandEvent
+ ;wxButton::SetDefaultStyle(wxButton*,unsigned long)
+ SetDefaultStyle__8wxButtonFP8wxButtonUl
;wxButton::SetTmpDefault()
SetTmpDefault__8wxButtonFv
;wxButton::WindowProc(unsigned int,void*,void*)
__dt__8wxButtonFv
;wxButton::SendClickEvent()
SendClickEvent__8wxButtonFv
- ;wxButton::UpdateDefaultStyle(wxWindow*,wxWindow*)
- UpdateDefaultStyle__8wxButtonFP8wxWindowT1
;wxConstructorForwxButton()
wxConstructorForwxButton__Fv
;wxButton::GetDefaultSize()
HandleMenuSelect__7wxFrameFUsT1Ul
;wxFrame::OS2TranslateMessage(void**)
OS2TranslateMessage__7wxFrameFPPv
+ ;wxFrame::SendSizeEvent()
+ SendSizeEvent__7wxFrameFv
;wxFrame::HandlePaint()
HandlePaint__7wxFrameFv
;wxFrame::OnCreateStatusBar(int,long,int,const wxString&)
GetDescription__14wxFileTypeImplCFP8wxString
;wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString&)
EnumAllFileTypes__22wxMimeTypesManagerImplFR13wxArrayString
+ ;wxFileTypeImpl::GetIcon(wxIcon*,wxString*,int*) const
+ GetIcon__14wxFileTypeImplCFP6wxIconP8wxStringPi
;wxFileTypeImpl::GetOpenCommand(wxString*,const wxFileType::MessageParameters&) const
GetOpenCommand__14wxFileTypeImplCFP8wxStringRCQ2_10wxFileType17MessageParameters
;wxFileTypeImpl::GetPrintCommand(wxString*,const wxFileType::MessageParameters&) const
GetPrintCommand__14wxFileTypeImplCFP8wxStringRCQ2_10wxFileType17MessageParameters
;wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString&)
GetFileTypeFromExtension__22wxMimeTypesManagerImplFRC8wxString
- ;wxFileTypeImpl::GetIcon(wxIcon*) const
- GetIcon__14wxFileTypeImplCFP6wxIcon
;wxFileTypeImpl::GetCommand(const char*) const
GetCommand__14wxFileTypeImplCFPCc
;wxFileTypeImpl::GetMimeTypes(wxArrayString&) const
m_svAllSpins__10wxSpinCtrl
;wxSpinCtrl::DoGetPosition(int*,int*) const
DoGetPosition__10wxSpinCtrlCFPiT1
+ ;wxSpinCtrl::SetSelection(long,long)
+ SetSelection__10wxSpinCtrlFlT1
;wxSpinCtrl::DoMoveWindow(int,int,int,int)
DoMoveWindow__10wxSpinCtrlFiN31
wxSpinCtrlWndProc