Bitmap and menu updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,11 +13,11 @@
|
|||||||
#define _WX_MENU_H_
|
#define _WX_MENU_H_
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
// #include "wx/accel.h"
|
#include "wx/accel.h"
|
||||||
// #include "wx/list.h" // for "template" list classes
|
#include "wx/list.h" // for "template" list classes
|
||||||
// #include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
|
|
||||||
// WX_DECLARE_EXPORTED_LIST(wxAcceleratorEntry, wxAcceleratorList);
|
WX_DEFINE_EXPORTED_ARRAY(wxAcceleratorEntry *, wxAcceleratorArray);
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
class WXDLLEXPORT wxFrame;
|
class WXDLLEXPORT wxFrame;
|
||||||
@@ -78,6 +78,8 @@ public:
|
|||||||
// Implementation only from now on
|
// Implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
//
|
//
|
||||||
|
virtual void Attach(wxMenuBarBase* pMenubar);
|
||||||
|
|
||||||
bool OS2Command( WXUINT uParam
|
bool OS2Command( WXUINT uParam
|
||||||
,WXWORD wId
|
,WXWORD wId
|
||||||
);
|
);
|
||||||
@@ -100,8 +102,8 @@ public:
|
|||||||
//
|
//
|
||||||
// Called by wxMenuBar to build its accel table from the accels of all menus
|
// Called by wxMenuBar to build its accel table from the accels of all menus
|
||||||
//
|
//
|
||||||
bool HasAccels(void) const { return m_vAccels[0] != NULL; }
|
bool HasAccels(void) const { return m_vAccels.IsEmpty(); }
|
||||||
size_t GetAccelCount(void) const { return (size_t)m_nNextAccel; }
|
size_t GetAccelCount(void) const { return m_vAccels.GetCount(); }
|
||||||
size_t CopyAccels(wxAcceleratorEntry* pAccels) const;
|
size_t CopyAccels(wxAcceleratorEntry* pAccels) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -171,8 +173,7 @@ private:
|
|||||||
//
|
//
|
||||||
// The accelerators for our menu items
|
// The accelerators for our menu items
|
||||||
//
|
//
|
||||||
wxAcceleratorEntry* m_vAccels[128];
|
wxAcceleratorArray m_vAccels;
|
||||||
int m_nNextAccel;
|
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||||
|
@@ -49,7 +49,7 @@ public:
|
|||||||
,int nId = wxID_SEPARATOR
|
,int nId = wxID_SEPARATOR
|
||||||
,const wxString& rStrName = ""
|
,const wxString& rStrName = ""
|
||||||
,const wxString& rWxHelp = ""
|
,const wxString& rWxHelp = ""
|
||||||
,wxItemKind kind = wxITEM_NORMAL
|
,wxItemKind eKind = wxITEM_NORMAL
|
||||||
,wxMenu* pSubMenu = NULL
|
,wxMenu* pSubMenu = NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -88,6 +88,9 @@ public:
|
|||||||
//
|
//
|
||||||
int GetRealId(void) const;
|
int GetRealId(void) const;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Mark item as belonging to the given radio group
|
||||||
|
//
|
||||||
void SetAsRadioGroupStart(void);
|
void SetAsRadioGroupStart(void);
|
||||||
void SetRadioGroupStart(int nStart);
|
void SetRadioGroupStart(int nStart);
|
||||||
void SetRadioGroupEnd(int nEnd);
|
void SetRadioGroupEnd(int nEnd);
|
||||||
@@ -111,7 +114,12 @@ private:
|
|||||||
int m_nStart;
|
int m_nStart;
|
||||||
int m_nEnd;
|
int m_nEnd;
|
||||||
} m_vRadioGroup;
|
} m_vRadioGroup;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Does this item start a radio group?
|
||||||
|
//
|
||||||
bool m_bIsRadioGroupStart;
|
bool m_bIsRadioGroupStart;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxMenuItem)
|
DECLARE_DYNAMIC_CLASS(wxMenuItem)
|
||||||
}; // end of CLASS wxMenuItem
|
}; // end of CLASS wxMenuItem
|
||||||
|
|
||||||
|
@@ -405,7 +405,7 @@ public:
|
|||||||
,int nY
|
,int nY
|
||||||
,WXUINT uFlags
|
,WXUINT uFlags
|
||||||
);
|
);
|
||||||
bool HandleChar( WXDWORD wParam
|
bool HandleChar( WXWPARAM wParam
|
||||||
,WXLPARAM lParam
|
,WXLPARAM lParam
|
||||||
,bool bIsASCII = FALSE
|
,bool bIsASCII = FALSE
|
||||||
);
|
);
|
||||||
|
@@ -90,7 +90,7 @@ wxAcceleratorTable::wxAcceleratorTable(
|
|||||||
|
|
||||||
::WinSetAccelTable( vHabmain
|
::WinSetAccelTable( vHabmain
|
||||||
,hAccel
|
,hAccel
|
||||||
,(HWND)pFrame->GetHWND()
|
,(HWND)pFrame->GetFrame()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
M_ACCELDATA->m_hAccel = hAccel;
|
M_ACCELDATA->m_hAccel = hAccel;
|
||||||
@@ -162,7 +162,7 @@ wxAcceleratorTable::wxAcceleratorTable(
|
|||||||
|
|
||||||
::WinSetAccelTable( vHabmain
|
::WinSetAccelTable( vHabmain
|
||||||
,M_ACCELDATA->m_hAccel
|
,M_ACCELDATA->m_hAccel
|
||||||
,(HWND)pFrame->GetHWND()
|
,(HWND)pFrame->GetFrame()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -403,7 +403,7 @@ bool wxComboBox::ProcessEditMsg(
|
|||||||
switch(vFlag)
|
switch(vFlag)
|
||||||
{
|
{
|
||||||
case KC_CHAR:
|
case KC_CHAR:
|
||||||
return (HandleChar( SHORT1FROMMP(wParam)
|
return (HandleChar( wParam
|
||||||
,lParam
|
,lParam
|
||||||
,TRUE /* isASCII */
|
,TRUE /* isASCII */
|
||||||
));
|
));
|
||||||
@@ -419,6 +419,13 @@ bool wxComboBox::ProcessEditMsg(
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_SETFOCUS:
|
||||||
|
if (SHORT1FROMMP((MPARAM)lParam) == TRUE)
|
||||||
|
return(HandleSetFocus((WXHWND)(HWND)wParam));
|
||||||
|
else
|
||||||
|
return(HandleKillFocus((WXHWND)(HWND)wParam));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} // end of WinGuiBase_CComboBox::ProcessEditMsg
|
} // end of WinGuiBase_CComboBox::ProcessEditMsg
|
||||||
@@ -440,6 +447,7 @@ MRESULT EXPENTRY wxComboEditWndProc(
|
|||||||
//
|
//
|
||||||
// Forward some messages to the combobox
|
// Forward some messages to the combobox
|
||||||
//
|
//
|
||||||
|
case WM_SETFOCUS:
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
{
|
{
|
||||||
wxComboBox* pCombo = wxDynamicCast( pWin
|
wxComboBox* pCombo = wxDynamicCast( pWin
|
||||||
|
@@ -1072,14 +1072,10 @@ bool wxFrame::HandleSize(
|
|||||||
PositionToolBar();
|
PositionToolBar();
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
wxSizeEvent vEvent( wxSize( nX
|
bProcessed = wxWindow::HandleSize( nX
|
||||||
,nY
|
,nY
|
||||||
)
|
,nId
|
||||||
,m_windowId
|
|
||||||
);
|
);
|
||||||
|
|
||||||
vEvent.SetEventObject(this);
|
|
||||||
bProcessed = GetEventHandler()->ProcessEvent(vEvent);
|
|
||||||
}
|
}
|
||||||
return bProcessed;
|
return bProcessed;
|
||||||
} // end of wxFrame::HandleSize
|
} // end of wxFrame::HandleSize
|
||||||
|
@@ -113,6 +113,7 @@ static wxString TextToLabel(const wxString& rTitle)
|
|||||||
void wxMenu::Init()
|
void wxMenu::Init()
|
||||||
{
|
{
|
||||||
m_bDoBreak = FALSE;
|
m_bDoBreak = FALSE;
|
||||||
|
m_nStartRadioGroup = -1;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create the menu (to be used as a submenu or a popup)
|
// Create the menu (to be used as a submenu or a popup)
|
||||||
@@ -151,9 +152,6 @@ void wxMenu::Init()
|
|||||||
);
|
);
|
||||||
AppendSeparator();
|
AppendSeparator();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 128; i++)
|
|
||||||
m_vAccels[i] = NULL;
|
|
||||||
m_nNextAccel = 0;
|
|
||||||
} // end of wxMenu::Init
|
} // end of wxMenu::Init
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -177,17 +175,7 @@ wxMenu::~wxMenu()
|
|||||||
//
|
//
|
||||||
// Delete accels
|
// Delete accels
|
||||||
//
|
//
|
||||||
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
|
WX_CLEAR_ARRAY(m_vAccels);
|
||||||
for (int i = 0; i < 128; i++)
|
|
||||||
{
|
|
||||||
if (m_vAccels[i])
|
|
||||||
{
|
|
||||||
delete m_vAccels[i];
|
|
||||||
m_vAccels[i] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// WX_CLEAR_ARRAY(m_vAccels);
|
|
||||||
#endif
|
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
} // end of wxMenu::~wxMenu
|
} // end of wxMenu::~wxMenu
|
||||||
|
|
||||||
@@ -197,31 +185,26 @@ void wxMenu::Break()
|
|||||||
m_bDoBreak = TRUE;
|
m_bDoBreak = TRUE;
|
||||||
} // end of wxMenu::Break
|
} // end of wxMenu::Break
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
void wxMenu::Attach(
|
||||||
|
wxMenuBarBase* pMenubar
|
||||||
void wxMenu::EndRadioGroup()
|
)
|
||||||
{
|
{
|
||||||
//
|
wxMenuBase::Attach(pMenubar);
|
||||||
// We're not inside a radio group any longer
|
EndRadioGroup();
|
||||||
//
|
} // end of wxMenu::Break;
|
||||||
m_nStartRadioGroup = -1;
|
|
||||||
} // end of wxMenu::EndRadioGroup
|
#if wxUSE_ACCEL
|
||||||
|
|
||||||
int wxMenu::FindAccel(
|
int wxMenu::FindAccel(
|
||||||
int nId
|
int nId
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
size_t n;
|
size_t n;
|
||||||
// size_t nCount = m_vAccels.GetCount();
|
size_t nCount = m_vAccels.GetCount();
|
||||||
|
|
||||||
for (n = 0; n < m_nNextAccel; n++)
|
for (n = 0; n < nCount; n++)
|
||||||
{
|
|
||||||
if (m_vAccels[n] != NULL)
|
|
||||||
{
|
|
||||||
if (m_vAccels[n]->m_command == nId)
|
if (m_vAccels[n]->m_command == nId)
|
||||||
return n;
|
return n;
|
||||||
}
|
|
||||||
}
|
|
||||||
return wxNOT_FOUND;
|
return wxNOT_FOUND;
|
||||||
} // end of wxMenu::FindAccel
|
} // end of wxMenu::FindAccel
|
||||||
|
|
||||||
@@ -246,6 +229,7 @@ void wxMenu::UpdateAccel(
|
|||||||
// Find the (new) accel for this item
|
// Find the (new) accel for this item
|
||||||
//
|
//
|
||||||
wxAcceleratorEntry* pAccel = wxGetAccelFromString(pItem->GetText());
|
wxAcceleratorEntry* pAccel = wxGetAccelFromString(pItem->GetText());
|
||||||
|
|
||||||
if (pAccel)
|
if (pAccel)
|
||||||
pAccel->m_command = pItem->GetId();
|
pAccel->m_command = pItem->GetId();
|
||||||
|
|
||||||
@@ -260,17 +244,9 @@ void wxMenu::UpdateAccel(
|
|||||||
// No old, add new if any
|
// No old, add new if any
|
||||||
//
|
//
|
||||||
if (pAccel)
|
if (pAccel)
|
||||||
{
|
m_vAccels.Add(pAccel);
|
||||||
if (m_nNextAccel < 128)
|
|
||||||
{
|
|
||||||
m_vAccels[m_nNextAccel] = pAccel;
|
|
||||||
m_nNextAccel++;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return; // skipping RebuildAccelTable() below
|
return;
|
||||||
}
|
|
||||||
else
|
|
||||||
return; // skipping RebuildAccelTable() below
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -278,10 +254,10 @@ void wxMenu::UpdateAccel(
|
|||||||
// Replace old with new or just remove the old one if no new
|
// Replace old with new or just remove the old one if no new
|
||||||
//
|
//
|
||||||
delete m_vAccels[n];
|
delete m_vAccels[n];
|
||||||
m_vAccels[n] = NULL;
|
|
||||||
|
|
||||||
if (pAccel)
|
if (pAccel)
|
||||||
m_vAccels[n] = pAccel;
|
m_vAccels[n] = pAccel;
|
||||||
|
else
|
||||||
|
m_vAccels.RemoveAt(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsAttached())
|
if (IsAttached())
|
||||||
@@ -437,6 +413,14 @@ bool wxMenu::DoInsertOrAppend(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
} // end of wxMenu::DoInsertOrAppend
|
} // end of wxMenu::DoInsertOrAppend
|
||||||
|
|
||||||
|
void wxMenu::EndRadioGroup()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// We're not inside a radio group any longer
|
||||||
|
//
|
||||||
|
m_nStartRadioGroup = -1;
|
||||||
|
} // end of wxMenu::EndRadioGroup
|
||||||
|
|
||||||
bool wxMenu::DoAppend(
|
bool wxMenu::DoAppend(
|
||||||
wxMenuItem* pItem
|
wxMenuItem* pItem
|
||||||
)
|
)
|
||||||
@@ -473,6 +457,7 @@ bool wxMenu::DoAppend(
|
|||||||
// We need to update its end item
|
// We need to update its end item
|
||||||
//
|
//
|
||||||
pItem->SetRadioGroupStart(m_nStartRadioGroup);
|
pItem->SetRadioGroupStart(m_nStartRadioGroup);
|
||||||
|
|
||||||
wxMenuItemList::Node* pNode = GetMenuItems().Item(m_nStartRadioGroup);
|
wxMenuItemList::Node* pNode = GetMenuItems().Item(m_nStartRadioGroup);
|
||||||
|
|
||||||
if (pNode)
|
if (pNode)
|
||||||
@@ -489,16 +474,20 @@ bool wxMenu::DoAppend(
|
|||||||
{
|
{
|
||||||
EndRadioGroup();
|
EndRadioGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxMenuBase::DoAppend(pItem) || !DoInsertOrAppend(pItem))
|
if (!wxMenuBase::DoAppend(pItem) || !DoInsertOrAppend(pItem))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (bCheck)
|
if (bCheck)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// Check the item initially
|
||||||
|
//
|
||||||
pItem->Check(TRUE);
|
pItem->Check(TRUE);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} // end of wxMenu::DoInsert
|
} // end of wxMenu::DoAppend
|
||||||
|
|
||||||
bool wxMenu::DoInsert(
|
bool wxMenu::DoInsert(
|
||||||
size_t nPos
|
size_t nPos
|
||||||
@@ -509,7 +498,8 @@ bool wxMenu::DoInsert(
|
|||||||
,pItem) &&
|
,pItem) &&
|
||||||
DoInsertOrAppend( pItem
|
DoInsertOrAppend( pItem
|
||||||
,nPos
|
,nPos
|
||||||
));
|
)
|
||||||
|
);
|
||||||
} // end of wxMenu::DoInsert
|
} // end of wxMenu::DoInsert
|
||||||
|
|
||||||
wxMenuItem* wxMenu::DoRemove(
|
wxMenuItem* wxMenu::DoRemove(
|
||||||
@@ -543,7 +533,7 @@ wxMenuItem* wxMenu::DoRemove(
|
|||||||
if (n != wxNOT_FOUND)
|
if (n != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
delete m_vAccels[n];
|
delete m_vAccels[n];
|
||||||
m_vAccels[n] = NULL;
|
m_vAccels.RemoveAt(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
@@ -1120,7 +1110,7 @@ void wxMenuBar::Attach(
|
|||||||
wxFrame* pFrame
|
wxFrame* pFrame
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") );
|
wxMenuBarBase::Attach(pFrame);
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
RebuildAccelTable();
|
RebuildAccelTable();
|
||||||
@@ -1128,8 +1118,8 @@ void wxMenuBar::Attach(
|
|||||||
// Ensure the accelerator table is set to the frame (not the client!)
|
// Ensure the accelerator table is set to the frame (not the client!)
|
||||||
//
|
//
|
||||||
if (!::WinSetAccelTable( vHabmain
|
if (!::WinSetAccelTable( vHabmain
|
||||||
,(HWND)pFrame->GetHWND()
|
|
||||||
,m_vAccelTable.GetHACCEL()
|
,m_vAccelTable.GetHACCEL()
|
||||||
|
,(HWND)pFrame->GetFrame()
|
||||||
))
|
))
|
||||||
wxLogLastError("WinSetAccelTable");
|
wxLogLastError("WinSetAccelTable");
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
@@ -236,9 +236,10 @@ wxString wxMenuItemBase::GetLabelFromText(
|
|||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
// radio group stuff
|
//
|
||||||
|
// Radio group stuff
|
||||||
// -----------------
|
// -----------------
|
||||||
|
//
|
||||||
void wxMenuItem::SetAsRadioGroupStart()
|
void wxMenuItem::SetAsRadioGroupStart()
|
||||||
{
|
{
|
||||||
m_bIsRadioGroupStart = TRUE;
|
m_bIsRadioGroupStart = TRUE;
|
||||||
@@ -248,23 +249,23 @@ void wxMenuItem::SetRadioGroupStart(
|
|||||||
int nStart
|
int nStart
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !m_bIsRadioGroupStart,
|
wxASSERT_MSG( !m_bIsRadioGroupStart
|
||||||
_T("should only be called for the next radio items") );
|
,_T("should only be called for the next radio items")
|
||||||
|
);
|
||||||
|
|
||||||
m_vRadioGroup.m_nStart = nStart;
|
m_vRadioGroup.m_nStart = nStart;
|
||||||
} // end of wxMenuItem::SetRadioGroupStart
|
} // wxMenuItem::SetRadioGroupStart
|
||||||
|
|
||||||
void wxMenuItem::SetRadioGroupEnd(
|
void wxMenuItem::SetRadioGroupEnd(
|
||||||
int nEnd
|
int nEnd
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( m_bIsRadioGroupStart,
|
wxASSERT_MSG( m_bIsRadioGroupStart
|
||||||
_T("should only be called for the first radio item") );
|
,_T("should only be called for the first radio item")
|
||||||
|
);
|
||||||
m_vRadioGroup.m_nEnd = nEnd;
|
m_vRadioGroup.m_nEnd = nEnd;
|
||||||
} // end of wxMenuItem::SetRadioGroupEnd
|
} // end of wxMenuItem::SetRadioGroupEnd
|
||||||
|
|
||||||
|
|
||||||
// change item state
|
// change item state
|
||||||
// -----------------
|
// -----------------
|
||||||
|
|
||||||
@@ -306,6 +307,7 @@ void wxMenuItem::Check(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
HMENU hMenu = GetHmenuOf(m_parentMenu);
|
HMENU hMenu = GetHmenuOf(m_parentMenu);
|
||||||
|
|
||||||
if (GetKind() == wxITEM_RADIO)
|
if (GetKind() == wxITEM_RADIO)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -319,23 +321,26 @@ void wxMenuItem::Check(
|
|||||||
//
|
//
|
||||||
const wxMenuItemList& rItems = m_parentMenu->GetMenuItems();
|
const wxMenuItemList& rItems = m_parentMenu->GetMenuItems();
|
||||||
int nPos = rItems.IndexOf(this);
|
int nPos = rItems.IndexOf(this);
|
||||||
int nStart;
|
|
||||||
int nEnd;
|
|
||||||
|
|
||||||
wxCHECK_RET( nPos != wxNOT_FOUND,
|
wxCHECK_RET( nPos != wxNOT_FOUND
|
||||||
_T("menuitem not found in the menu items list?") );
|
,_T("menuitem not found in the menu items list?")
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the radio group range
|
// Get the radio group range
|
||||||
//
|
//
|
||||||
|
int nStart;
|
||||||
|
int nEnd;
|
||||||
|
|
||||||
if (m_bIsRadioGroupStart)
|
if (m_bIsRadioGroupStart)
|
||||||
{
|
{
|
||||||
// we already have all information we need
|
//
|
||||||
|
// We already have all information we need
|
||||||
|
//
|
||||||
nStart = nPos;
|
nStart = nPos;
|
||||||
nEnd = m_vRadioGroup.m_nEnd;
|
nEnd = m_vRadioGroup.m_nEnd;
|
||||||
}
|
}
|
||||||
else // Next radio group item
|
else // next radio group item
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Get the radio group end from the start item
|
// Get the radio group end from the start item
|
||||||
@@ -351,22 +356,18 @@ void wxMenuItem::Check(
|
|||||||
|
|
||||||
for (int n = nStart; n <= nEnd && pNode; n++)
|
for (int n = nStart; n <= nEnd && pNode; n++)
|
||||||
{
|
{
|
||||||
if (n != nPos)
|
|
||||||
{
|
|
||||||
pNode->GetData()->m_isChecked = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (n == nPos)
|
if (n == nPos)
|
||||||
{
|
{
|
||||||
bOk = (bool)::WinSendMsg( hMenu
|
::WinSendMsg( hMenu
|
||||||
,MM_SETITEMATTR
|
,MM_SETITEMATTR
|
||||||
,MPFROM2SHORT(n, TRUE)
|
,MPFROM2SHORT(n, TRUE)
|
||||||
,MPFROM2SHORT(MIA_CHECKED, MIA_CHECKED)
|
,MPFROM2SHORT(MIA_CHECKED, MIA_CHECKED)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
if (n != nPos)
|
||||||
{
|
{
|
||||||
bOk = (bool)::WinSendMsg( hMenu
|
pNode->GetData()->m_isChecked = FALSE;
|
||||||
|
::WinSendMsg( hMenu
|
||||||
,MM_SETITEMATTR
|
,MM_SETITEMATTR
|
||||||
,MPFROM2SHORT(n, TRUE)
|
,MPFROM2SHORT(n, TRUE)
|
||||||
,MPFROM2SHORT(MIA_CHECKED, FALSE)
|
,MPFROM2SHORT(MIA_CHECKED, FALSE)
|
||||||
|
@@ -2759,20 +2759,7 @@ MRESULT wxWindowOS2::OS2WindowProc(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (m_bLastKeydownProcessed)
|
bProcessed = HandleChar(wParam, lParam);
|
||||||
{
|
|
||||||
//
|
|
||||||
// The key was handled in the EVT_KEY_DOWN and handling
|
|
||||||
// a key in an EVT_KEY_DOWN handler is meant, by
|
|
||||||
// design, to prevent EVT_CHARs from happening
|
|
||||||
//
|
|
||||||
m_bLastKeydownProcessed = FALSE;
|
|
||||||
bProcessed = TRUE;
|
|
||||||
}
|
|
||||||
else // do generate a CHAR event
|
|
||||||
{
|
|
||||||
bProcessed = HandleChar((WXDWORD)wParam, lParam);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2790,7 +2777,7 @@ MRESULT wxWindowOS2::OS2WindowProc(
|
|||||||
}
|
}
|
||||||
else // do generate a CHAR event
|
else // do generate a CHAR event
|
||||||
{
|
{
|
||||||
bProcessed = HandleChar((WXDWORD)wParam, lParam, TRUE);
|
bProcessed = HandleChar(wParam, lParam, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4050,7 +4037,7 @@ wxKeyEvent wxWindowOS2::CreateKeyEvent(
|
|||||||
// WM_KEYDOWN one
|
// WM_KEYDOWN one
|
||||||
//
|
//
|
||||||
bool wxWindowOS2::HandleChar(
|
bool wxWindowOS2::HandleChar(
|
||||||
WXDWORD wParam
|
WXWPARAM wParam
|
||||||
, WXLPARAM lParam
|
, WXLPARAM lParam
|
||||||
, bool isASCII
|
, bool isASCII
|
||||||
)
|
)
|
||||||
@@ -4073,7 +4060,7 @@ bool wxWindowOS2::HandleChar(
|
|||||||
//
|
//
|
||||||
// If 1 -> 26, translate to CTRL plus a letter.
|
// If 1 -> 26, translate to CTRL plus a letter.
|
||||||
//
|
//
|
||||||
vId = wParam;
|
vId = (int)wParam;
|
||||||
if ((vId > 0) && (vId < 27))
|
if ((vId > 0) && (vId < 27))
|
||||||
{
|
{
|
||||||
switch (vId)
|
switch (vId)
|
||||||
@@ -4098,7 +4085,7 @@ bool wxWindowOS2::HandleChar(
|
|||||||
}
|
}
|
||||||
else // we're called from WM_KEYDOWN
|
else // we're called from WM_KEYDOWN
|
||||||
{
|
{
|
||||||
vId = wxCharCodeOS2ToWX(wParam);
|
vId = wxCharCodeOS2ToWX((int)wParam);
|
||||||
if (vId == 0)
|
if (vId == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,7 @@ DATA MULTIPLE NONSHARED READWRITE LOADONCALL
|
|||||||
CODE LOADONCALL
|
CODE LOADONCALL
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
;From library: H:\DEV\Wx2\WxWindows\lib\wx.lib
|
;From library: F:\DEV\WX2\WXWINDOWS\LIB\WX.lib
|
||||||
;From object file: dummy.cpp
|
;From object file: dummy.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
wxDummyChar
|
wxDummyChar
|
||||||
@@ -1709,6 +1709,8 @@ EXPORTS
|
|||||||
wxConstructorForwxSysColourChangedEvent__Fv
|
wxConstructorForwxSysColourChangedEvent__Fv
|
||||||
;wxConstructorForwxNavigationKeyEvent()
|
;wxConstructorForwxNavigationKeyEvent()
|
||||||
wxConstructorForwxNavigationKeyEvent__Fv
|
wxConstructorForwxNavigationKeyEvent__Fv
|
||||||
|
;wxConstructorForwxMouseCaptureChangedEvent()
|
||||||
|
wxConstructorForwxMouseCaptureChangedEvent__Fv
|
||||||
;wxConstructorForwxHelpEvent()
|
;wxConstructorForwxHelpEvent()
|
||||||
wxConstructorForwxHelpEvent__Fv
|
wxConstructorForwxHelpEvent__Fv
|
||||||
;wxEvtHandler::~wxEvtHandler()
|
;wxEvtHandler::~wxEvtHandler()
|
||||||
@@ -1879,6 +1881,8 @@ EXPORTS
|
|||||||
sm_classwxScrollWinEvent__16wxScrollWinEvent
|
sm_classwxScrollWinEvent__16wxScrollWinEvent
|
||||||
;wxNcPaintEvent::sm_classwxNcPaintEvent
|
;wxNcPaintEvent::sm_classwxNcPaintEvent
|
||||||
sm_classwxNcPaintEvent__14wxNcPaintEvent
|
sm_classwxNcPaintEvent__14wxNcPaintEvent
|
||||||
|
;wxMouseCaptureChangedEvent::sm_classwxMouseCaptureChangedEvent
|
||||||
|
sm_classwxMouseCaptureChangedEvent__26wxMouseCaptureChangedEvent
|
||||||
;wxIdleEvent::sm_classwxIdleEvent
|
;wxIdleEvent::sm_classwxIdleEvent
|
||||||
sm_classwxIdleEvent__11wxIdleEvent
|
sm_classwxIdleEvent__11wxIdleEvent
|
||||||
;wxDropFilesEvent::sm_classwxDropFilesEvent
|
;wxDropFilesEvent::sm_classwxDropFilesEvent
|
||||||
@@ -1921,7 +1925,7 @@ EXPORTS
|
|||||||
wxEVT_NC_LEFT_DCLICK
|
wxEVT_NC_LEFT_DCLICK
|
||||||
wxEVT_INIT_DIALOG
|
wxEVT_INIT_DIALOG
|
||||||
wxEVT_COMMAND_SET_FOCUS
|
wxEVT_COMMAND_SET_FOCUS
|
||||||
;From object file: H:\DEV\WX2\WXWINDOWS\src\common\extended.c
|
;From object file: F:\DEV\WX2\WXWINDOWS\src\common\extended.c
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
ConvertToIeeeExtended
|
ConvertToIeeeExtended
|
||||||
ConvertFromIeeeExtended
|
ConvertFromIeeeExtended
|
||||||
@@ -6023,7 +6027,7 @@ EXPORTS
|
|||||||
Read32__17wxTextInputStreamFv
|
Read32__17wxTextInputStreamFv
|
||||||
;wxTextInputStream::SkipIfEndOfLine(char)
|
;wxTextInputStream::SkipIfEndOfLine(char)
|
||||||
SkipIfEndOfLine__17wxTextInputStreamFc
|
SkipIfEndOfLine__17wxTextInputStreamFc
|
||||||
;From object file: H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
|
;From object file: F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
unzReadCurrentFile
|
unzReadCurrentFile
|
||||||
unzGetCurrentFileInfo
|
unzGetCurrentFileInfo
|
||||||
@@ -7706,12 +7710,16 @@ EXPORTS
|
|||||||
SetFilterIndex__16wxGenericDirCtrlFi
|
SetFilterIndex__16wxGenericDirCtrlFi
|
||||||
;wxDirFilterListCtrl::FillFilterList(const wxString&,int)
|
;wxDirFilterListCtrl::FillFilterList(const wxString&,int)
|
||||||
FillFilterList__19wxDirFilterListCtrlFRC8wxStringi
|
FillFilterList__19wxDirFilterListCtrlFRC8wxStringi
|
||||||
|
;wxGenericDirCtrl::ReCreateTree()
|
||||||
|
ReCreateTree__16wxGenericDirCtrlFv
|
||||||
;wxGenericDirCtrl::SetupSections()
|
;wxGenericDirCtrl::SetupSections()
|
||||||
SetupSections__16wxGenericDirCtrlFv
|
SetupSections__16wxGenericDirCtrlFv
|
||||||
;wxGenericDirCtrl::ShowHidden(unsigned long)
|
;wxGenericDirCtrl::ShowHidden(unsigned long)
|
||||||
ShowHidden__16wxGenericDirCtrlFUl
|
ShowHidden__16wxGenericDirCtrlFUl
|
||||||
;wxGenericDirCtrl::OnCollapseItem(wxTreeEvent&)
|
;wxGenericDirCtrl::OnCollapseItem(wxTreeEvent&)
|
||||||
OnCollapseItem__16wxGenericDirCtrlFR11wxTreeEvent
|
OnCollapseItem__16wxGenericDirCtrlFR11wxTreeEvent
|
||||||
|
;wxGenericDirCtrl::CollapseDir(wxTreeItemId)
|
||||||
|
CollapseDir__16wxGenericDirCtrlF12wxTreeItemId
|
||||||
;wxDirItemData::HasSubDirs() const
|
;wxDirItemData::HasSubDirs() const
|
||||||
HasSubDirs__13wxDirItemDataCFv
|
HasSubDirs__13wxDirItemDataCFv
|
||||||
;wxGenericDirCtrl::GetPath() const
|
;wxGenericDirCtrl::GetPath() const
|
||||||
@@ -13246,10 +13254,12 @@ EXPORTS
|
|||||||
OS2Command__6wxMenuFUiUs
|
OS2Command__6wxMenuFUiUs
|
||||||
;wxMenuBar::EnableTop(unsigned int,unsigned long)
|
;wxMenuBar::EnableTop(unsigned int,unsigned long)
|
||||||
EnableTop__9wxMenuBarFUiUl
|
EnableTop__9wxMenuBarFUiUl
|
||||||
;wxMenu::DoAppend(wxMenuItem*)
|
;wxMenu::Attach(wxMenuBarBase*)
|
||||||
DoAppend__6wxMenuFP10wxMenuItem
|
Attach__6wxMenuFP13wxMenuBarBase
|
||||||
;wxMenu::DoRemove(wxMenuItem*)
|
;wxMenu::DoRemove(wxMenuItem*)
|
||||||
DoRemove__6wxMenuFP10wxMenuItem
|
DoRemove__6wxMenuFP10wxMenuItem
|
||||||
|
;wxMenu::DoAppend(wxMenuItem*)
|
||||||
|
DoAppend__6wxMenuFP10wxMenuItem
|
||||||
;wxMenu::CopyAccels(wxAcceleratorEntry*) const
|
;wxMenu::CopyAccels(wxAcceleratorEntry*) const
|
||||||
CopyAccels__6wxMenuCFP18wxAcceleratorEntry
|
CopyAccels__6wxMenuCFP18wxAcceleratorEntry
|
||||||
;wxMenuBar::Refresh()
|
;wxMenuBar::Refresh()
|
||||||
@@ -14977,8 +14987,8 @@ EXPORTS
|
|||||||
FindItemByHWND__8wxWindowCFUlT1
|
FindItemByHWND__8wxWindowCFUlT1
|
||||||
;wxWindow::HandleKeyUp(void*,void*)
|
;wxWindow::HandleKeyUp(void*,void*)
|
||||||
HandleKeyUp__8wxWindowFPvT1
|
HandleKeyUp__8wxWindowFPvT1
|
||||||
;wxWindow::HandleChar(unsigned long,void*,unsigned long)
|
;wxWindow::HandleChar(void*,void*,unsigned long)
|
||||||
HandleChar__8wxWindowFUlPvT1
|
HandleChar__8wxWindowFPvT1Ul
|
||||||
;wxWindow::DoMoveWindow(int,int,int,int)
|
;wxWindow::DoMoveWindow(int,int,int,int)
|
||||||
DoMoveWindow__8wxWindowFiN31
|
DoMoveWindow__8wxWindowFiN31
|
||||||
;wxWindow::DoClientToScreen(int*,int*) const
|
;wxWindow::DoClientToScreen(int*,int*) const
|
||||||
|
Reference in New Issue
Block a user