More OS/2 update to fix some owner drawn things

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2002-09-03 22:26:53 +00:00
parent a715019788
commit f5ea767eb8
8 changed files with 49 additions and 32 deletions

View File

@@ -24,7 +24,7 @@ class wxCheckListBoxItem; // fwd decl, define in checklst.cpp
class WXDLLEXPORT wxCheckListBox : public wxListBox
{
public:
//
//
// Ctors
//
wxCheckListBox();
@@ -41,7 +41,7 @@ public:
,const wxString& rsName = wxListBoxNameStr
);
//
//
// Override base class virtuals
//
virtual void Delete(int n);
@@ -52,7 +52,7 @@ public:
virtual bool SetFont(const wxFont &rFont);
//
//
// Items may be checked
//
bool IsChecked(size_t uiIndex) const;
@@ -60,20 +60,20 @@ public:
,bool bCheck = TRUE
);
//
//
// Accessors
//
size_t GetItemHeight(void) const { return m_nItemHeight; }
protected:
//
//
// We create our items ourselves and they have non-standard size,
// so we need to override these functions
//
virtual wxOwnerDrawn* CreateItem(size_t n);
virtual bool OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
//
//
// Pressing space or clicking the check box toggles the item
//
void OnChar(wxKeyEvent& rEvent);
@@ -89,7 +89,7 @@ private:
,const wxItemResource* pParentResource
,const wxResourceTable* pTable = (const wxResourceTable *) NULL
)
{
{
return(wxWindowBase::CreateItem( pChildResource
,pParentResource
,pTable

View File

@@ -73,7 +73,7 @@ public:
// For ownerdraw items
//
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
virtual bool OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return 0L; };
wxArrayLong& GetSubcontrols() { return m_aSubControls; }
void OnEraseBackground(wxEraseEvent& rEvent);

View File

@@ -121,7 +121,7 @@ public:
// wxCheckListBox support
//
#if wxUSE_OWNER_DRAWN
bool OS2OnMeasure(WXMEASUREITEMSTRUCT *item);
long OS2OnMeasure(WXMEASUREITEMSTRUCT *item);
bool OS2OnDraw(WXDRAWITEMSTRUCT *item);
virtual wxOwnerDrawn* CreateItem(size_t n);

View File

@@ -367,7 +367,7 @@ public:
virtual bool OS2OnDrawItem( int nId
,WXDRAWITEMSTRUCT* pItem
);
virtual bool OS2OnMeasureItem( int nId
virtual long OS2OnMeasureItem( int nId
,WXMEASUREITEMSTRUCT* pItem
);