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 GetQDGlobalsBlack( a ) (&((*a) = qd.black))
#define GetQDGlobalsScreenBits( a ) (*a) = qd.screenBits #define GetQDGlobalsScreenBits( a ) (*a) = qd.screenBits
#define GetQDGlobalsArrow( a ) (&((*a) = qd.arrow)) #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 )) #define GetPortBitMapForCopyBits( p ) ((BitMap*) &(((CGrafPtr)p)->portPixMap ))
#endif #endif

View File

@@ -471,7 +471,8 @@ void UMAActivateControl( ControlHandle inControl )
::ActivateControl( inControl ) ; ::ActivateControl( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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 ) ; bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , false , false ) ; SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ; Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
} }
::MoveControl( inControl , x , y ) ; ::MoveControl( inControl , x , y ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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 ) ; bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , false , false ) ; SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ; Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
} }
::SizeControl( inControl , x , y ) ; ::SizeControl( inControl , x , y ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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 ) ; ::DeactivateControl( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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() ) if ( UMAHasAppearance() )
{ {
SetControlVisibility( inControl , true , false ) ; SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ; Rect ctrlBounds ;
} InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
else
{
(**inControl).contrlVis = 255 ;
} }
} }

View File

@@ -471,7 +471,8 @@ void UMAActivateControl( ControlHandle inControl )
::ActivateControl( inControl ) ; ::ActivateControl( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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 ) ; bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , false , false ) ; SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ; Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
} }
::MoveControl( inControl , x , y ) ; ::MoveControl( inControl , x , y ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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 ) ; bool visible = UMAIsControlVisible( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , false , false ) ; SetControlVisibility( inControl , false , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ; Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
} }
::SizeControl( inControl , x , y ) ; ::SizeControl( inControl , x , y ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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 ) ; ::DeactivateControl( inControl ) ;
if ( visible ) { if ( visible ) {
SetControlVisibility( inControl , true , false ) ; 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() ) if ( UMAHasAppearance() )
{ {
SetControlVisibility( inControl , true , false ) ; SetControlVisibility( inControl , true , false ) ;
InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ; Rect ctrlBounds ;
} InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
else
{
(**inControl).contrlVis = 255 ;
} }
} }