added horizontal scrollbars to listboxes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -22,6 +22,21 @@ resource 'ldes' ( 128 )
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
resource 'ldes' ( 129 )
|
||||||
|
{
|
||||||
|
versionZero
|
||||||
|
{
|
||||||
|
0 ,
|
||||||
|
0 ,
|
||||||
|
0 ,
|
||||||
|
0 ,
|
||||||
|
hasVertScroll ,
|
||||||
|
hasHorizScroll ,
|
||||||
|
0 ,
|
||||||
|
noGrowSpace ,
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
data 'CURS' (10) {
|
data 'CURS' (10) {
|
||||||
$"0000 03E0 0630 0808 1004 31C6 2362 2222"
|
$"0000 03E0 0630 0808 1004 31C6 2362 2222"
|
||||||
$"2362 31C6 1004 0808 0630 03E0 0000 0000"
|
$"2362 31C6 1004 0808 0630 03E0 0000 0000"
|
||||||
|
@@ -181,7 +181,9 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void MacDrawStringCell(Rect *cellRect, Cell lCell, ListHandle theList, long refCon) ;
|
extern "C" void MacDrawStringCell(Rect *cellRect, Cell lCell, ListHandle theList, long refCon) ;
|
||||||
|
// resources ldef ids
|
||||||
const short kwxMacListWithVerticalScrollbar = 128 ;
|
const short kwxMacListWithVerticalScrollbar = 128 ;
|
||||||
|
const short kwxMacListWithVerticalAndHorizontalScrollbar = 129 ;
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// list box control implementation
|
// list box control implementation
|
||||||
@@ -224,6 +226,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Str255 fontName ;
|
Str255 fontName ;
|
||||||
SInt16 fontSize ;
|
SInt16 fontSize ;
|
||||||
Style fontStyle ;
|
Style fontStyle ;
|
||||||
|
SInt16 fontNum ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
GetThemeFont(kThemeViewsFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
GetThemeFont(kThemeViewsFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
||||||
#else
|
#else
|
||||||
@@ -237,7 +240,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Size asize;
|
Size asize;
|
||||||
|
|
||||||
|
|
||||||
CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, false, true,
|
CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, (style & wxLB_HSCROLL), true,
|
||||||
kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, (ControlRef *)&m_macControl );
|
kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, (ControlRef *)&m_macControl );
|
||||||
|
|
||||||
GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag,
|
GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag,
|
||||||
@@ -251,8 +254,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
long result ;
|
long result ;
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
||||||
kwxMacListWithVerticalScrollbar , 0 , 0,
|
(style & wxLB_HSCROLL) ? kwxMacListWithVerticalAndHorizontalScrollbar : kwxMacListWithVerticalScrollbar ,
|
||||||
kControlListBoxProc , (long) this ) ;
|
0 , 0, kControlListBoxProc , (long) this ) ;
|
||||||
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
||||||
sizeof( ListHandle ) , (char*) &m_macList , &result ) ;
|
sizeof( ListHandle ) , (char*) &m_macList , &result ) ;
|
||||||
|
|
||||||
|
@@ -22,6 +22,21 @@ resource 'ldes' ( 128 )
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
resource 'ldes' ( 129 )
|
||||||
|
{
|
||||||
|
versionZero
|
||||||
|
{
|
||||||
|
0 ,
|
||||||
|
0 ,
|
||||||
|
0 ,
|
||||||
|
0 ,
|
||||||
|
hasVertScroll ,
|
||||||
|
hasHorizScroll ,
|
||||||
|
0 ,
|
||||||
|
noGrowSpace ,
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
data 'CURS' (10) {
|
data 'CURS' (10) {
|
||||||
$"0000 03E0 0630 0808 1004 31C6 2362 2222"
|
$"0000 03E0 0630 0808 1004 31C6 2362 2222"
|
||||||
$"2362 31C6 1004 0808 0630 03E0 0000 0000"
|
$"2362 31C6 1004 0808 0630 03E0 0000 0000"
|
||||||
|
@@ -181,7 +181,9 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void MacDrawStringCell(Rect *cellRect, Cell lCell, ListHandle theList, long refCon) ;
|
extern "C" void MacDrawStringCell(Rect *cellRect, Cell lCell, ListHandle theList, long refCon) ;
|
||||||
|
// resources ldef ids
|
||||||
const short kwxMacListWithVerticalScrollbar = 128 ;
|
const short kwxMacListWithVerticalScrollbar = 128 ;
|
||||||
|
const short kwxMacListWithVerticalAndHorizontalScrollbar = 129 ;
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// list box control implementation
|
// list box control implementation
|
||||||
@@ -224,6 +226,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Str255 fontName ;
|
Str255 fontName ;
|
||||||
SInt16 fontSize ;
|
SInt16 fontSize ;
|
||||||
Style fontStyle ;
|
Style fontStyle ;
|
||||||
|
SInt16 fontNum ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
GetThemeFont(kThemeViewsFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
GetThemeFont(kThemeViewsFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
||||||
#else
|
#else
|
||||||
@@ -237,7 +240,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Size asize;
|
Size asize;
|
||||||
|
|
||||||
|
|
||||||
CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, false, true,
|
CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, (style & wxLB_HSCROLL), true,
|
||||||
kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, (ControlRef *)&m_macControl );
|
kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, (ControlRef *)&m_macControl );
|
||||||
|
|
||||||
GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag,
|
GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag,
|
||||||
@@ -251,8 +254,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
long result ;
|
long result ;
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
||||||
kwxMacListWithVerticalScrollbar , 0 , 0,
|
(style & wxLB_HSCROLL) ? kwxMacListWithVerticalAndHorizontalScrollbar : kwxMacListWithVerticalScrollbar ,
|
||||||
kControlListBoxProc , (long) this ) ;
|
0 , 0, kControlListBoxProc , (long) this ) ;
|
||||||
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
||||||
sizeof( ListHandle ) , (char*) &m_macList , &result ) ;
|
sizeof( ListHandle ) , (char*) &m_macList , &result ) ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user