added GetControlBounds for accessing contrl.rect

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2001-06-03 10:29:00 +00:00
parent a92b8709d9
commit c36f02449b
3 changed files with 29 additions and 23 deletions

View File

@ -243,7 +243,7 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
#define GetQDGlobalsBlack( a ) (&((*a) = qd.black))
#define GetQDGlobalsScreenBits( a ) (*a) = qd.screenBits
#define GetQDGlobalsArrow( a ) (&((*a) = qd.arrow))
#define GetControlBounds( c , b ) ((*b) = (**c).contrlRect )
#define GetControlBounds( c , b ) &((*b) = (**c).contrlRect )
#define GetPortBitMapForCopyBits( p ) ((BitMap*) &(((CGrafPtr)p)->portPixMap ))
#endif

View File

@ -471,7 +471,8 @@ void UMAActivateControl( ControlHandle inControl )
::ActivateControl( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -530,12 +531,14 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
::MoveControl( inControl , x , y ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -547,12 +550,14 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
::SizeControl( inControl , x , y ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -569,7 +574,8 @@ void UMADeactivateControl( ControlHandle inControl )
::DeactivateControl( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -684,11 +690,8 @@ void UMAShowControl (ControlHandle inControl)
if ( UMAHasAppearance() )
{
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
}
else
{
(**inControl).contrlVis = 255 ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}

View File

@ -471,7 +471,8 @@ void UMAActivateControl( ControlHandle inControl )
::ActivateControl( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -530,12 +531,14 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
::MoveControl( inControl , x , y ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -547,12 +550,14 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
::SizeControl( inControl , x , y ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -569,7 +574,8 @@ void UMADeactivateControl( ControlHandle inControl )
::DeactivateControl( inControl ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}
}
@ -684,11 +690,8 @@ void UMAShowControl (ControlHandle inControl)
if ( UMAHasAppearance() )
{
SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
}
else
{
(**inControl).contrlVis = 255 ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
}
}