-1->wxID_ANY, TRUE->true, FALSE->false and tabs replacements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-06-07 16:02:23 +00:00
parent 6652e1a765
commit c82c42d498
30 changed files with 1863 additions and 1907 deletions

View File

@@ -6,7 +6,7 @@
// Created: 23/10/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -32,8 +32,8 @@ IMPLEMENT_DYNAMIC_CLASS( cbAntiflickerPlugin, cbPluginBase )
BEGIN_EVENT_TABLE( cbAntiflickerPlugin, cbPluginBase )
EVT_PL_START_DRAW_IN_AREA ( cbAntiflickerPlugin::OnStartDrawInArea )
EVT_PL_FINISH_DRAW_IN_AREA ( cbAntiflickerPlugin::OnFinishDrawInArea )
EVT_PL_START_DRAW_IN_AREA ( cbAntiflickerPlugin::OnStartDrawInArea )
EVT_PL_FINISH_DRAW_IN_AREA ( cbAntiflickerPlugin::OnFinishDrawInArea )
END_EVENT_TABLE()
@@ -49,188 +49,185 @@ wxMemoryDC* cbAntiflickerPlugin::mpHorizBufDc = 0;
// constructors
cbAntiflickerPlugin::cbAntiflickerPlugin(void)
: mpLRUBufDc ( NULL ),
mLRUArea ( -1,-1, -1,-1 )
: mpLRUBufDc ( NULL ),
mLRUArea ( -1,-1, -1,-1 )
{
++mRefCount;
++mRefCount;
}
cbAntiflickerPlugin::cbAntiflickerPlugin( wxFrameLayout* pPanel, int paneMask )
: cbPluginBase( pPanel, paneMask ),
mpLRUBufDc ( NULL ),
mLRUArea ( -1,-1, -1,-1 )
: cbPluginBase( pPanel, paneMask ),
mpLRUBufDc ( NULL ),
mLRUArea ( -1,-1, -1,-1 )
{
++mRefCount;
++mRefCount;
}
cbAntiflickerPlugin::~cbAntiflickerPlugin()
{
if ( --mRefCount == 0 )
{
if ( mpHorizBuf )
{
mpHorizBufDc->SelectObject( wxNullBitmap );
delete mpHorizBuf;
delete mpHorizBufDc;
mpHorizBuf = 0;
mpHorizBufDc = 0;
}
if ( --mRefCount == 0 )
{
if ( mpHorizBuf )
{
mpHorizBufDc->SelectObject( wxNullBitmap );
delete mpHorizBuf;
delete mpHorizBufDc;
mpHorizBuf = 0;
mpHorizBufDc = 0;
}
if ( mpVertBuf )
{
mpVertBufDc->SelectObject( wxNullBitmap );
delete mpVertBuf;
delete mpVertBufDc;
mpVertBuf = 0;
mpVertBufDc = 0;
}
}
if ( mpVertBuf )
{
mpVertBufDc->SelectObject( wxNullBitmap );
delete mpVertBuf;
delete mpVertBufDc;
mpVertBuf = 0;
mpVertBufDc = 0;
}
}
}
wxDC* cbAntiflickerPlugin::FindSuitableBuffer( const wxRect& forArea )
{
if ( mpVertBuf )
{
if ( mpVertBuf->GetHeight() >= forArea.height &&
mpVertBuf->GetWidth() >= forArea.width )
if ( mpVertBuf )
{
if ( mpVertBuf->GetHeight() >= forArea.height &&
mpVertBuf->GetWidth() >= forArea.width )
return mpVertBufDc;
}
else
if ( mpHorizBuf )
{
if ( mpHorizBuf->GetHeight() >= forArea.height &&
mpHorizBuf->GetWidth() >= forArea.width )
return mpHorizBufDc;
}
return mpVertBufDc;
}
else
if ( mpHorizBuf )
{
if ( mpHorizBuf->GetHeight() >= forArea.height &&
mpHorizBuf->GetWidth() >= forArea.width )
return mpHorizBufDc;
}
return 0;
return 0;
}
wxDC* cbAntiflickerPlugin::AllocNewBuffer( const wxRect& forArea )
{
// TBD:: preallocate bit larger bitmap at once, to avoid
// excessive realocations later
// TBD:: preallocate bit larger bitmap at once, to avoid
// excessive realocations later
// check whether the given area is oriented horizontally
// or vertically and choose corresponding bitmap to create or
// recreate
// check whether the given area is oriented horizontally
// or vertically and choose corresponding bitmap to create or
// recreate
if ( forArea.height > forArea.width )
{
wxSize prevDim( 0,0 );
if ( forArea.height > forArea.width )
{
wxSize prevDim( 0,0 );
if ( mpVertBuf )
{
prevDim.x = mpVertBuf->GetWidth();
prevDim.y = mpVertBuf->GetHeight();
if ( mpVertBuf )
{
prevDim.x = mpVertBuf->GetWidth();
prevDim.y = mpVertBuf->GetHeight();
mpVertBufDc->SelectObject( wxNullBitmap );
delete mpVertBuf;
}
else
mpVertBufDc = new wxMemoryDC();
mpVertBuf = new wxBitmap( int( wxMax(forArea.width, prevDim.x ) ),
int( wxMax(forArea.height, prevDim.y ) )
);
mpVertBufDc->SelectObject( wxNullBitmap );
delete mpVertBuf;
}
else
mpVertBufDc = new wxMemoryDC();
mpVertBufDc->SelectObject( *mpVertBuf );
mpVertBuf = new wxBitmap( int( wxMax(forArea.width, prevDim.x ) ),
int( wxMax(forArea.height, prevDim.y ) )
);
return mpVertBufDc;
}
else
{
wxSize prevDim( 0,0 );
mpVertBufDc->SelectObject( *mpVertBuf );
if ( mpHorizBuf )
{
prevDim.x = mpHorizBuf->GetWidth();
prevDim.y = mpHorizBuf->GetHeight();
return mpVertBufDc;
}
else
{
wxSize prevDim( 0,0 );
mpHorizBufDc->SelectObject( wxNullBitmap );
delete mpHorizBuf;
}
else
mpHorizBufDc = new wxMemoryDC();
mpHorizBuf = new wxBitmap( int( wxMax(forArea.width, prevDim.x ) ),
int( wxMax(forArea.height, prevDim.y ) )
);
if ( mpHorizBuf )
{
prevDim.x = mpHorizBuf->GetWidth();
prevDim.y = mpHorizBuf->GetHeight();
mpHorizBufDc->SelectObject( *mpHorizBuf );
mpHorizBufDc->SelectObject( wxNullBitmap );
delete mpHorizBuf;
}
else
mpHorizBufDc = new wxMemoryDC();
return mpHorizBufDc;
}
mpHorizBuf = new wxBitmap( int( wxMax(forArea.width, prevDim.x ) ),
int( wxMax(forArea.height, prevDim.y ) )
);
mpHorizBufDc->SelectObject( *mpHorizBuf );
return mpHorizBufDc;
}
}
void cbAntiflickerPlugin::OnStartDrawInArea( cbStartDrawInAreaEvent& event )
{
wxASSERT( mpLRUBufDc == NULL ); // DBG:: see comments in OnFinishDrawInArea(..) method
wxASSERT( mpLRUBufDc == NULL ); // DBG:: see comments in OnFinishDrawInArea(..) method
// short-cut
wxRect& area = event.mArea;
// short-cut
wxRect& area = event.mArea;
if ( event.mArea.width < 0 ||
event.mArea.height < 0 ) return;
if ( event.mArea.width < 0 ||
event.mArea.height < 0 ) return;
// memorize given area
mLRUArea.x = area.x;
mLRUArea.y = area.y;
mLRUArea.width = area.width;
mLRUArea.height = area.height;
// memorize given area
mLRUArea.x = area.x;
mLRUArea.y = area.y;
mLRUArea.width = area.width;
mLRUArea.height = area.height;
wxDC* pBufDc = FindSuitableBuffer( area );
wxDC* pBufDc = FindSuitableBuffer( area );
if ( !pBufDc )
pBufDc = AllocNewBuffer( area );
if ( !pBufDc )
pBufDc = AllocNewBuffer( area );
pBufDc->SetDeviceOrigin( -area.x, -area.y );
pBufDc->SetDeviceOrigin( -area.x, -area.y );
pBufDc->SetClippingRegion( area.x, area.y,
area.width, area.height );
pBufDc->SetClippingRegion( area.x, area.y,
area.width, area.height );
wxClientDC clntDc( &mpLayout->GetParentFrame() );
wxClientDC clntDc( &mpLayout->GetParentFrame() );
(*event.mppDc) = pBufDc;
(*event.mppDc) = pBufDc;
mpLRUBufDc = pBufDc; // memorize buffer, which will be flushed to screen
// upon "commiting" the drawing
mpLRUBufDc = pBufDc; // memorize buffer, which will be flushed to screen
// upon "commiting" the drawing
/*
// OLD STUFF::
mpLRUBufDc->Blit( pos.x, pos.y, size.x, size.y,
&clntDc, pos.x, pos.y, wxCOPY );
*/
/*
// OLD STUFF::
mpLRUBufDc->Blit( pos.x, pos.y, size.x, size.y,
&clntDc, pos.x, pos.y, wxCOPY );
*/
}
void cbAntiflickerPlugin::OnFinishDrawInArea( cbFinishDrawInAreaEvent& event )
{
wxRect& area = event.mArea;
wxRect& area = event.mArea;
if ( event.mArea.width < 0 ||
event.mArea.height < 0 ) return;
if ( event.mArea.width < 0 ||
event.mArea.height < 0 ) return;
wxASSERT( mpLRUBufDc ); // DBG:: OnStartDrawInArea should be called first
wxASSERT( mpLRUBufDc ); // DBG:: OnStartDrawInArea should be called first
// FOR NOW:: OnStartDrawInArea(..) should be immediately followed
// by OnFinishDrawInArea(..) for the same area
// FOR NOW:: OnStartDrawInArea(..) should be immediately followed
// by OnFinishDrawInArea(..) for the same area
wxASSERT( mLRUArea.x == area.x );
wxASSERT( mLRUArea.y == area.y );
wxASSERT( mLRUArea.width == area.width );
wxASSERT( mLRUArea.height == area.height );
wxASSERT( mLRUArea.x == area.x );
wxASSERT( mLRUArea.y == area.y );
wxASSERT( mLRUArea.width == area.width );
wxASSERT( mLRUArea.height == area.height );
wxClientDC clntDc( &mpLayout->GetParentFrame() );
wxClientDC clntDc( &mpLayout->GetParentFrame() );
// "commit" drawings in one-shot
clntDc.Blit( area.x, area.y, area.width, area.height,
mpLRUBufDc, area.x, area.y, wxCOPY );
// "commit" drawings in one-shot
clntDc.Blit( area.x, area.y, area.width, area.height,
mpLRUBufDc, area.x, area.y, wxCOPY );
mpLRUBufDc->DestroyClippingRegion();
mpLRUBufDc = 0;
mpLRUBufDc->DestroyClippingRegion();
mpLRUBufDc = 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -61,9 +61,9 @@ END_EVENT_TABLE()
cbBarHintsPlugin::cbBarHintsPlugin(void)
: mpPane( 0 ),
mBtnPressed ( FALSE ),
mCloseBoxOn ( TRUE ),
mCollapseBoxOn( TRUE ),
mBtnPressed ( false ),
mCloseBoxOn ( true ),
mCollapseBoxOn( true ),
mGrooveCount ( 2 ),
mHintGap ( 4 ),
mXWeight ( 2 )
@@ -76,9 +76,9 @@ cbBarHintsPlugin::cbBarHintsPlugin( wxFrameLayout* pLayout, int paneMask )
: cbPluginBase( pLayout, paneMask ),
mpPane( 0 ),
mBtnPressed ( FALSE ),
mCloseBoxOn ( TRUE ),
mCollapseBoxOn( TRUE ),
mBtnPressed ( false ),
mCloseBoxOn ( true ),
mCollapseBoxOn( true ),
mGrooveCount ( 2 ),
mHintGap ( 5 ),
mXWeight ( 2 )
@@ -280,7 +280,7 @@ void cbBarHintsPlugin::GetHintsLayout( wxRect& rect, cbBarInfo& info,
if ( info.IsExpanded() )
{
isAtLeft = FALSE;
isAtLeft = false;
cbBarInfo* pCur = info.mpPrev;
@@ -288,7 +288,7 @@ void cbBarHintsPlugin::GetHintsLayout( wxRect& rect, cbBarInfo& info,
{
if ( !pCur->IsFixed() )
{
isAtLeft = TRUE; break;
isAtLeft = true; break;
}
pCur = pCur->mpPrev;
@@ -363,7 +363,7 @@ int cbBarHintsPlugin::HitTestHints( cbBarInfo& info, const wxPoint& pos )
wxRect& rect = info.mBoundsInParent;
if ( info.IsFixed() ) return FALSE;
if ( info.IsFixed() ) return false;
int boxOfs, grooveOfs, coord;
@@ -413,7 +413,7 @@ int cbBarHintsPlugin::HitTestHints( cbBarInfo& info, const wxPoint& pos )
}
}
return FALSE;
return false;
}
// handlers for plugin-events
@@ -468,8 +468,8 @@ void cbBarHintsPlugin::OnLeftDown( cbLeftDownEvent& event )
int i;
for ( i = 0; i != BOXES_IN_HINT; ++i )
{
mBoxes[i]->mPressed = FALSE;
mBoxes[i]->mWasClicked = FALSE;
mBoxes[i]->mPressed = false;
mBoxes[i]->mWasClicked = false;
}
for ( i = 0; i != BOXES_IN_HINT; ++i )
{
@@ -477,7 +477,7 @@ void cbBarHintsPlugin::OnLeftDown( cbLeftDownEvent& event )
if ( mBoxes[i]->mPressed )
{
mBtnPressed = TRUE;
mBtnPressed = true;
mpClickedBar = &bar;
return; // event handled
@@ -511,7 +511,7 @@ void cbBarHintsPlugin::OnLeftUp( cbLeftUpEvent& event )
{
if ( i == 0 )
{
mpLayout->SetBarState( mpClickedBar, wxCBAR_HIDDEN, TRUE );
mpLayout->SetBarState( mpClickedBar, wxCBAR_HIDDEN, true );
// Notify bar child window of close event:
if(mpClickedBar->mpBarWnd!=NULL)
mpClickedBar->mpBarWnd->Close();
@@ -526,7 +526,7 @@ void cbBarHintsPlugin::OnLeftUp( cbLeftUpEvent& event )
}
}
mBtnPressed = FALSE;
mBtnPressed = false;
return;
}
else

View File

@@ -6,7 +6,7 @@
// Created: 06/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -31,14 +31,14 @@
class cbContextMenuHandler : public wxEvtHandler
{
public:
cbSimpleCustomizationPlugin* mpBackRef;
cbSimpleCustomizationPlugin* mpBackRef;
public:
void OnMenuCommand( wxCommandEvent& evt );
void OnMenuCommand( wxCommandEvent& evt );
void OnCommandEvents( wxCommandEvent& evt );
void OnCommandEvents( wxCommandEvent& evt );
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
// FIXME:: is this "safe" ?
@@ -49,21 +49,21 @@ public:
BEGIN_EVENT_TABLE( cbContextMenuHandler, wxEvtHandler )
// FIXME:: what is the right range for these ids ? so that they
// would not collide with user commands?
// FIXME:: what is the right range for these ids ? so that they
// would not collide with user commands?
EVT_COMMAND_RANGE( CB_CUSTOMIZE_MENU_FIRST_ITEM_ID,
CB_CUSTOMIZE_MENU_FIRST_ITEM_ID + 300,
wxEVT_COMMAND_MENU_SELECTED,
cbContextMenuHandler::OnCommandEvents )
EVT_COMMAND_RANGE( CB_CUSTOMIZE_MENU_FIRST_ITEM_ID,
CB_CUSTOMIZE_MENU_FIRST_ITEM_ID + 300,
wxEVT_COMMAND_MENU_SELECTED,
cbContextMenuHandler::OnCommandEvents )
END_EVENT_TABLE()
void cbContextMenuHandler::OnCommandEvents( wxCommandEvent& evt )
{
//wxMessageBox("Wowwwww, Yeah!");
//wxMessageBox("Wowwwww, Yeah!");
mpBackRef->OnMenuItemSelected( evt );
mpBackRef->OnMenuItemSelected( evt );
}
/***** Implementation for class cbSimpleCustomizationPlugin *****/
@@ -72,8 +72,8 @@ IMPLEMENT_DYNAMIC_CLASS( cbSimpleCustomizationPlugin, cbPluginBase )
BEGIN_EVENT_TABLE( cbSimpleCustomizationPlugin, cbPluginBase )
EVT_PL_CUSTOMIZE_BAR ( cbSimpleCustomizationPlugin::OnCustomizeBar )
EVT_PL_CUSTOMIZE_LAYOUT( cbSimpleCustomizationPlugin::OnCustomizeLayout )
EVT_PL_CUSTOMIZE_BAR ( cbSimpleCustomizationPlugin::OnCustomizeBar )
EVT_PL_CUSTOMIZE_LAYOUT( cbSimpleCustomizationPlugin::OnCustomizeLayout )
END_EVENT_TABLE()
@@ -82,124 +82,121 @@ cbSimpleCustomizationPlugin::cbSimpleCustomizationPlugin(void)
cbSimpleCustomizationPlugin::cbSimpleCustomizationPlugin( wxFrameLayout* pPanel, int paneMask )
: cbPluginBase( pPanel, paneMask )
: cbPluginBase( pPanel, paneMask )
{}
void cbSimpleCustomizationPlugin::OnCustomizeBar( cbCustomizeBarEvent& event )
{
// ingnore bar customization, treat it
// as layout-customization...ugly, eh?
// ingnore bar customization, treat it
// as layout-customization...ugly, eh?
cbCustomizeLayoutEvent clEvt( event.mClickPos );
cbCustomizeLayoutEvent clEvt( event.mClickPos );
OnCustomizeLayout( clEvt );
OnCustomizeLayout( clEvt );
}
void cbSimpleCustomizationPlugin::OnCustomizeLayout( cbCustomizeLayoutEvent& event )
{
wxString helpStr1 = wxT("Select this item to show the corresponding control bar");
wxString helpStr2 = wxT("Select this itme to hide the corresponding control bar");
wxString helpStr1 = wxT("Select this item to show the corresponding control bar");
wxString helpStr2 = wxT("Select this itme to hide the corresponding control bar");
int id = CB_CUSTOMIZE_MENU_FIRST_ITEM_ID;
int id = CB_CUSTOMIZE_MENU_FIRST_ITEM_ID;
wxMenu* pMenu = new wxMenu();
wxMenu* pMenu = new wxMenu();
BarArrayT& bars = mpLayout->GetBars();
BarArrayT& bars = mpLayout->GetBars();
for( size_t i = 0; i != bars.GetCount(); ++i )
{
cbBarInfo& bar = *bars[i];
bool isHidden = ( bar.mState == wxCBAR_HIDDEN );
for( size_t i = 0; i != bars.GetCount(); ++i )
{
cbBarInfo& bar = *bars[i];
wxString* pHelpStr = ( isHidden ) ? &helpStr1 : &helpStr2;
bool isHidden = ( bar.mState == wxCBAR_HIDDEN );
pMenu->Append( id, bar.mName, *pHelpStr, TRUE );
wxString* pHelpStr = ( isHidden ) ? &helpStr1 : &helpStr2;
pMenu->Check( id, (isHidden == FALSE) );
pMenu->Append( id, bar.mName, *pHelpStr, true );
++id;
}
pMenu->Check( id, (isHidden == false) );
++id;
}
// Customization dialog not implemented, so don't show the menu item
#if 0
pMenu->AppendSeparator();
pMenu->Append( id, "Customize...", "Show layout customization dialog", FALSE );
pMenu->AppendSeparator();
pMenu->Append( id, "Customize...", "Show layout customization dialog", false );
#endif
mCustMenuItemId = id;
mCustMenuItemId = id;
cbContextMenuHandler* pHandler = new cbContextMenuHandler();
pHandler->mpBackRef = this;
cbContextMenuHandler* pHandler = new cbContextMenuHandler();
pHandler->mpBackRef = this;
wxWindow* pFrm = &mpLayout->GetParentFrame();
wxWindow* pFrm = &mpLayout->GetParentFrame();
// FOR NOW FOR NOW:: to work-around wxFrame's (MSW) nasty event-handling bugs!!!
// FOR NOW FOR NOW:: to work-around wxFrame's (MSW) nasty event-handling bugs!!!
wxWindow* pTmpWnd = new wxWindow( pFrm, -1, event.mClickPos, wxSize(0,0) );
wxWindow* pTmpWnd = new wxWindow( pFrm, wxID_ANY, event.mClickPos, wxSize(0,0) );
pMenu->SetEventHandler( pHandler );
pMenu->SetEventHandler( pHandler );
pTmpWnd->PopupMenu( pMenu, 0,0 );
pTmpWnd->PopupMenu( pMenu, 0,0 );
pTmpWnd->Destroy();
pTmpWnd->Destroy();
delete pMenu;
delete pHandler;
delete pMenu;
delete pHandler;
// event is "eaten" by this plugin
// event is "eaten" by this plugin
}
void cbSimpleCustomizationPlugin::OnMenuItemSelected( wxCommandEvent& event )
{
if ( event.GetId() == mCustMenuItemId )
{
wxMessageBox(wxT("Customization dialog box is not supported by this plugin yet"));
if ( event.GetId() == mCustMenuItemId )
{
wxMessageBox(wxT("Customization dialog box is not supported by this plugin yet"));
return;
}
else
{
cbBarInfo* pBar = mpLayout->GetBars()[ event.GetId() -
CB_CUSTOMIZE_MENU_FIRST_ITEM_ID
];
return;
}
else
{
cbBarInfo* pBar = mpLayout->GetBars()[ event.GetId() - CB_CUSTOMIZE_MENU_FIRST_ITEM_ID ];
wxASSERT( pBar ); // DBG::
wxASSERT( pBar ); // DBG::
// "inverse" bar-visibility of the selected bar
// "inverse" bar-visibility of the selected bar
int newState;
int newState;
if ( pBar->mState == wxCBAR_HIDDEN )
{
if ( pBar->mAlignment == -1 )
{
pBar->mAlignment = 0; // just remove "-1" marking
newState = wxCBAR_FLOATING;
}
else
if ( pBar->mAlignment == FL_ALIGN_TOP ||
pBar->mAlignment == FL_ALIGN_BOTTOM )
if ( pBar->mState == wxCBAR_HIDDEN )
{
if ( pBar->mAlignment == -1 )
{
pBar->mAlignment = 0; // just remove "-1" marking
newState = wxCBAR_FLOATING;
}
else
if ( pBar->mAlignment == FL_ALIGN_TOP ||
pBar->mAlignment == FL_ALIGN_BOTTOM )
newState = wxCBAR_DOCKED_HORIZONTALLY;
else
newState = wxCBAR_DOCKED_VERTICALLY;
}
else
{
newState = wxCBAR_HIDDEN;
newState = wxCBAR_DOCKED_HORIZONTALLY;
else
newState = wxCBAR_DOCKED_VERTICALLY;
}
else
{
newState = wxCBAR_HIDDEN;
if ( pBar->mState == wxCBAR_FLOATING )
if ( pBar->mState == wxCBAR_FLOATING )
pBar->mAlignment = -1;
}
pBar->mAlignment = -1;
}
mpLayout->SetBarState( pBar, newState, TRUE );
mpLayout->SetBarState( pBar, newState, true );
if ( newState == wxCBAR_FLOATING )
if ( newState == wxCBAR_FLOATING )
mpLayout->RepositionFloatedBar( pBar );
}
mpLayout->RepositionFloatedBar( pBar );
}
// menu-item-selected event is "eaten"
// menu-item-selected event is "eaten"
}

View File

@@ -235,7 +235,7 @@ bool cbBarSpy::ProcessEvent(wxEvent& event)
else
mpLayout->OnLDblClick( mevent );
//event.Skip(FALSE);
//event.Skip(false);
}
return handled;
@@ -289,9 +289,9 @@ wxFrameLayout::wxFrameLayout(void)
mpTopPlugin ( NULL ),
mpCaputesInput( NULL ),
mClientWndRefreshPending( FALSE ),
mRecalcPending( TRUE ),
mCheckFocusWhenIdle( FALSE )
mClientWndRefreshPending( false ),
mRecalcPending( true ),
mCheckFocusWhenIdle( false )
{
CreateCursors();
@@ -318,14 +318,14 @@ wxFrameLayout::wxFrameLayout( wxWindow* pParentFrame, wxWindow* pFrameClient, bo
mpPaneInFocus( NULL ),
mpLRUPane ( NULL ),
mFloatingOn ( TRUE ),
mFloatingOn ( true ),
mpTopPlugin ( NULL ),
mpCaputesInput( NULL ),
mClientWndRefreshPending( FALSE ),
mRecalcPending( TRUE ),
mCheckFocusWhenIdle( FALSE ),
mClientWndRefreshPending( false ),
mRecalcPending( true ),
mCheckFocusWhenIdle( false ),
mpUpdatesMgr( NULL )
{
@@ -354,13 +354,13 @@ wxFrameLayout::wxFrameLayout( wxWindow* pParentFrame, wxWindow* pFrameClient, bo
bool wxFrameLayout::CanReparent()
{
#ifdef __WXMSW__
return TRUE;
return true;
#elif defined (__WXGTK__)
//return TRUE;
return FALSE;
//return true;
return false;
#else
return FALSE; // reparenting is not yet supported by Motif and others
return false; // reparenting is not yet supported by Motif and others
#endif
}
@@ -524,14 +524,14 @@ void wxFrameLayout::Activate()
{
HookUpToFrame();
RefreshNow( TRUE );
RefreshNow( true );
ShowFloatedWindows( TRUE );
ShowFloatedWindows( true );
}
void wxFrameLayout::Deactivate()
{
ShowFloatedWindows( FALSE );
ShowFloatedWindows( false );
UnhookFromFrame();
@@ -619,7 +619,7 @@ bool wxFrameLayout::RedockBar( cbBarInfo* pBar,
if ( !pToPane )
return FALSE; // bar's shape does not hit any pane
return false; // bar's shape does not hit any pane
// - redocking is NOT possible
cbDockPane* pBarPane = GetBarPane( pBar );
@@ -635,11 +635,11 @@ bool wxFrameLayout::RedockBar( cbBarInfo* pBar,
// but first the "pane-postion-changed" problem
// has to be fixed
RecalcLayout( FALSE );
RecalcLayout( false );
pToPane->InsertBar( pBar, shapeInParent );
RecalcLayout( FALSE );
RecalcLayout( false );
// finish update "transaction"
@@ -649,7 +649,7 @@ bool wxFrameLayout::RedockBar( cbBarInfo* pBar,
GetUpdatesManager().UpdateNow();
}
return TRUE;
return true;
}
cbBarInfo* wxFrameLayout::FindBarByName( const wxString& name )
@@ -687,7 +687,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
GetUpdatesManager().OnStartChanges();
pBar->mUMgrData.SetDirty(TRUE);
pBar->mUMgrData.SetDirty(true);
// check bar's previous state
@@ -721,7 +721,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
if ( pBar->mpBarWnd )
{
pBar->mpBarWnd->Show(FALSE); // to avoid flicker upon reparenting
pBar->mpBarWnd->Show(false); // to avoid flicker upon reparenting
wxNode* pNode = mFloatedFrames.GetFirst();
@@ -731,7 +731,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
if ( pFFrm->GetBar() == pBar )
{
pFFrm->Show( FALSE ); // reduces flicker sligthly
pFFrm->Show( false ); // reduces flicker sligthly
ReparentWindow( pBar->mpBarWnd, &GetParentFrame() );
@@ -743,7 +743,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
mFloatedFrames.DeleteNode( pNode );
pFFrm->Show( FALSE );
pFFrm->Show( false );
pFFrm->Destroy(); break;
}
@@ -753,7 +753,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
// FOR NOW:: excessive!
//if ( mpFrameClient ) mpFrameClient->Refresh();
if ( mpFrameClient )
mClientWndRefreshPending = TRUE;
mClientWndRefreshPending = true;
}
}
@@ -768,7 +768,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
if ( updateNow )
{
RecalcLayout(FALSE);
RecalcLayout(false);
GetUpdatesManager().OnFinishChanges();
GetUpdatesManager().UpdateNow();
@@ -807,7 +807,7 @@ void wxFrameLayout::InverseVisibility( cbBarInfo* pBar )
pBar->mAlignment = -1;
}
this->SetBarState( pBar, newState, TRUE );
this->SetBarState( pBar, newState, true );
if ( newState == wxCBAR_FLOATING )
@@ -875,7 +875,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
if ( pBar->mpBarWnd )
pBar->mpBarWnd->Show( FALSE );
pBar->mpBarWnd->Show( false );
}
else
{
@@ -890,7 +890,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
if ( pBar->mpBarWnd )
pBar->mpBarWnd->Show( FALSE );
pBar->mpBarWnd->Show( false );
pBar->mState = wxCBAR_HIDDEN;
@@ -902,7 +902,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
pMiniFrm->SetBar( pBar );
pMiniFrm->SetLayout( this );
pMiniFrm->Create( &GetParentFrame(), -1, pBar->mName,
pMiniFrm->Create( &GetParentFrame(), wxID_ANY, pBar->mName,
wxPoint( 50,50 ),
wxSize ( 0, 0 ),
wxFRAME_FLOAT_ON_PARENT |
@@ -944,10 +944,10 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
mNextFloatedWndPos.y += mFloatingPosStep.y;
}
pMiniFrm->Show( TRUE );
pMiniFrm->Show( true );
// FIXME:: this is excessive
pBar->mpBarWnd->Show(TRUE);
pBar->mpBarWnd->Show(true);
}
}
@@ -978,7 +978,7 @@ void wxFrameLayout::RemoveBar( cbBarInfo* pBarInfo )
#endif
if ( pBarInfo->mpBarWnd ) // hides it's window
pBarInfo->mpBarWnd->Show( FALSE );
pBarInfo->mpBarWnd->Show( false );
delete pBarInfo;
@@ -1007,16 +1007,16 @@ bool wxFrameLayout::LocateBar( cbBarInfo* pBarInfo,
(*ppPane) = mPanes[n];
(*ppRow ) = &i.RowInfo();
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void wxFrameLayout::RecalcLayout( bool repositionBarsNow )
{
mRecalcPending = FALSE;
mRecalcPending = false;
int frmWidth, frmHeight;
mpFrame->GetClientSize( &frmWidth, &frmHeight );
@@ -1142,10 +1142,10 @@ void wxFrameLayout::PositionClientWindow()
if ( !mpFrameClient->IsShown() )
mpFrameClient->Show( TRUE );
mpFrameClient->Show( true );
}
else
mpFrameClient->Show( FALSE );
mpFrameClient->Show( false );
}
}
@@ -1164,12 +1164,12 @@ void wxFrameLayout::PositionPanes()
void wxFrameLayout::OnSize( wxSizeEvent& event )
{
mpFrame->ProcessEvent( event );
event.Skip( FALSE ); // stop its progpagation
event.Skip( false ); // stop its progpagation
if ( event.GetEventObject() == (wxObject*) mpFrame )
{
GetUpdatesManager().OnStartChanges();
RecalcLayout(TRUE);
RecalcLayout(true);
GetUpdatesManager().OnFinishChanges();
GetUpdatesManager().UpdateNow();
}
@@ -1183,15 +1183,15 @@ void wxFrameLayout::HideBarWindows()
size_t i;
for ( i = 0; i != mAllBars.Count(); ++i )
if ( mAllBars[i]->mpBarWnd && mAllBars[i]->mState != wxCBAR_FLOATING )
mAllBars[i]->mpBarWnd->Show( FALSE );
mAllBars[i]->mpBarWnd->Show( false );
// then floated frames
ShowFloatedWindows( FALSE );
ShowFloatedWindows( false );
if ( mpFrameClient )
mpFrameClient->Show( FALSE );
mpFrameClient->Show( false );
}
void wxFrameLayout::UnhookFromFrame()
@@ -1456,7 +1456,7 @@ void wxFrameLayout::OnMouseMove( wxMouseEvent& event )
void wxFrameLayout::OnPaint( wxPaintEvent& event )
{
if ( mRecalcPending )
RecalcLayout( TRUE );
RecalcLayout( true );
wxPaintDC dc(mpFrame);
@@ -1488,11 +1488,11 @@ void wxFrameLayout::OnIdle( wxIdleEvent& event )
{
wxMessageBox(wxT("Hi, no more focus in this app!"));
mCheckFocusWhenIdle = FALSE;
//ShowFloatedWindows( FALSE );
mCheckFocusWhenIdle = false;
//ShowFloatedWindows( false );
}
mCheckFocusWhenIdle = FALSE;
mCheckFocusWhenIdle = false;
event.Skip();
}
@@ -1501,24 +1501,24 @@ void wxFrameLayout::OnIdle( wxIdleEvent& event )
void wxFrameLayout::OnKillFocus( wxFocusEvent& WXUNUSED(event) )
{
//wxMessageBox( "wxFrameLayoutGot Kill Focus!" );
//ShowFloatedWindows( FALSE );
//ShowFloatedWindows( false );
}
void wxFrameLayout::OnSetFocus( wxFocusEvent& WXUNUSED(event) )
{
//ShowFloatedWindows( TRUE );
//ShowFloatedWindows( true );
}
void wxFrameLayout::OnActivate( wxActivateEvent& WXUNUSED(event) )
{
#if 0
if ( event.GetActive() == FALSE )
if ( event.GetActive() == false )
{
wxWindow* focus = wxWindow::FindFocus();
if ( !focus || focus == &GetParentFrame() )
{
mCheckFocusWhenIdle = TRUE;
mCheckFocusWhenIdle = true;
if ( !focus )
@@ -1570,7 +1570,7 @@ void wxFrameLayout::SetPaneBackground( const wxColour& colour )
void wxFrameLayout::RefreshNow( bool recalcLayout )
{
if ( recalcLayout )
RecalcLayout( TRUE );
RecalcLayout( true );
if ( mpFrame )
mpFrame->Refresh();
@@ -1584,14 +1584,14 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event )
if ( mpCaputesInput )
{
bool isInputEvt = TRUE;
bool isInputEvt = true;
#if wxCHECK_VERSION(2,3,0)
if ( event.m_eventType != cbEVT_PL_LEFT_DOWN &&
event.m_eventType != cbEVT_PL_LEFT_UP &&
event.m_eventType != cbEVT_PL_RIGHT_DOWN &&
event.m_eventType != cbEVT_PL_RIGHT_UP &&
event.m_eventType != cbEVT_PL_MOTION )
isInputEvt = FALSE;
isInputEvt = false;
#else
switch ( event.m_eventType )
{
@@ -1601,7 +1601,7 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event )
case cbEVT_PL_RIGHT_UP : break;
case cbEVT_PL_MOTION : break;
default : isInputEvt = FALSE; break;
default : isInputEvt = false; break;
}
#endif // #if wxCHECK_VERSION(2,3,0)
@@ -1814,7 +1814,7 @@ IMPLEMENT_DYNAMIC_CLASS( cbUpdateMgrData, wxObject )
cbUpdateMgrData::cbUpdateMgrData()
: mPrevBounds( -1,-1,0,0 ),
mIsDirty( TRUE ) // inidicate initial change
mIsDirty( true ) // inidicate initial change
{}
void cbUpdateMgrData::StoreItemState( const wxRect& boundsInParent )
@@ -1859,7 +1859,7 @@ bool wxBarIterator::Next()
{
if ( mpRow->mBars.GetCount() == 0 )
{
return FALSE;
return false;
}
mpBar = mpRow->mBars[0];
@@ -1875,13 +1875,13 @@ bool wxBarIterator::Next()
mpBar = mpRow->mBars[0];
else
return FALSE;
return false;
}
return TRUE;
return true;
}
else
return FALSE;
return false;
}
cbBarInfo& wxBarIterator::BarInfo()
@@ -1921,7 +1921,7 @@ cbDimInfo::cbDimInfo()
: mVertGap ( 0 ),
mHorizGap( 0 ),
mIsFixed(TRUE),
mIsFixed(true),
mpHandler( NULL )
{
size_t i;
@@ -2053,16 +2053,16 @@ IMPLEMENT_DYNAMIC_CLASS( cbCommonPaneProperties, wxObject )
cbCommonPaneProperties::cbCommonPaneProperties(void)
: mRealTimeUpdatesOn ( TRUE ),
mOutOfPaneDragOn ( TRUE ),
mExactDockPredictionOn( FALSE ),
mNonDestructFrictionOn( FALSE ),
mShow3DPaneBorderOn ( TRUE ),
mBarFloatingOn ( FALSE ),
mRowProportionsOn ( FALSE ),
mColProportionsOn ( TRUE ),
mBarCollapseIconsOn ( FALSE ),
mBarDragHintsOn ( FALSE ),
: mRealTimeUpdatesOn ( true ),
mOutOfPaneDragOn ( true ),
mExactDockPredictionOn( false ),
mNonDestructFrictionOn( false ),
mShow3DPaneBorderOn ( true ),
mBarFloatingOn ( false ),
mRowProportionsOn ( false ),
mColProportionsOn ( true ),
mBarCollapseIconsOn ( false ),
mBarDragHintsOn ( false ),
mMinCBarDim( 16, 16 ),
mResizeHandleSize( 4 )
@@ -2111,7 +2111,7 @@ IMPLEMENT_DYNAMIC_CLASS( cbRowInfo, wxObject )
cbRowInfo::cbRowInfo(void)
: mNotFixedBarsCnt( FALSE ),
: mNotFixedBarsCnt( false ),
mpNext ( NULL ),
mpPrev ( NULL ),
mpExpandedBar ( NULL )
@@ -2130,7 +2130,7 @@ IMPLEMENT_DYNAMIC_CLASS( cbBarInfo, wxObject )
cbBarInfo::cbBarInfo(void)
: mpRow( NULL ),
mFloatingOn( TRUE ),
mFloatingOn( true ),
mpNext( NULL ),
mpPrev( NULL )
{}
@@ -2181,7 +2181,7 @@ cbDockPane::~cbDockPane()
for ( i = 0; i != mRows.Count(); ++i )
delete mRows[i];
mRowShapeData.DeleteContents( TRUE );
mRowShapeData.DeleteContents( true );
// NOTE:: control bar infromation structures are cleaned-up
// in wxFrameLayout's destructor, using global control-bar list
@@ -2371,7 +2371,7 @@ void cbDockPane::RemoveBar( cbBarInfo* pBar )
void cbDockPane::SyncRowFlags( cbRowInfo* pRow )
{
// setup mHasOnlyFixedBars flag for the row information
pRow->mHasOnlyFixedBars = TRUE;
pRow->mHasOnlyFixedBars = true;
pRow->mNotFixedBarsCnt = 0;
@@ -2384,7 +2384,7 @@ void cbDockPane::SyncRowFlags( cbRowInfo* pRow )
if ( !bar.IsFixed() )
{
pRow->mHasOnlyFixedBars = FALSE;
pRow->mHasOnlyFixedBars = false;
++pRow->mNotFixedBarsCnt;
}
}
@@ -2577,10 +2577,10 @@ bool cbDockPane::HasNotFixedRowsAbove( cbRowInfo* pRow )
if ( pRow->mHasOnlyFixedBars )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool cbDockPane::HasNotFixedRowsBelow( cbRowInfo* pRow )
@@ -2591,10 +2591,10 @@ bool cbDockPane::HasNotFixedRowsBelow( cbRowInfo* pRow )
if ( pRow->mHasOnlyFixedBars )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool cbDockPane::HasNotFixedBarsLeft( cbBarInfo* pBar )
@@ -2605,10 +2605,10 @@ bool cbDockPane::HasNotFixedBarsLeft( cbBarInfo* pBar )
if ( pBar->IsFixed() )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool cbDockPane::HasNotFixedBarsRight( cbBarInfo* pBar )
@@ -2619,10 +2619,10 @@ bool cbDockPane::HasNotFixedBarsRight( cbBarInfo* pBar )
if ( pBar->IsFixed() )
return TRUE;
return true;
}
return FALSE;
return false;
}
void cbDockPane::CalcLengthRatios( cbRowInfo* pInRow )
@@ -2700,7 +2700,7 @@ void cbDockPane::ExpandBar( cbBarInfo* pBar )
pBar->mpRow->mpExpandedBar = pBar;
mpLayout->RecalcLayout( FALSE );
mpLayout->RecalcLayout( false );
mpLayout->GetUpdatesManager().OnFinishChanges();
mpLayout->GetUpdatesManager().UpdateNow();
@@ -2737,7 +2737,7 @@ void cbDockPane::ContractBar( cbBarInfo* pBar )
pBar->mpRow->mpExpandedBar = NULL;
mpLayout->RecalcLayout( FALSE );
mpLayout->RecalcLayout( false );
mpLayout->GetUpdatesManager().OnFinishChanges();
mpLayout->GetUpdatesManager().UpdateNow();
@@ -2801,7 +2801,7 @@ void cbDockPane::DoInsertBar( cbBarInfo* pBar, int rowNo )
{
pRow = mRows[rowNo];
if ( mProps.mNonDestructFrictionOn == TRUE )
if ( mProps.mNonDestructFrictionOn == true )
{
// store original shape of the row (before the bar is inserted)
@@ -2850,8 +2850,8 @@ void cbDockPane::InsertBar( cbBarInfo* pBarInfo )
// set transient properties
pBarInfo->mpRow = NULL;
pBarInfo->mHasLeftHandle = FALSE;
pBarInfo->mHasRightHandle = FALSE;
pBarInfo->mHasLeftHandle = false;
pBarInfo->mHasRightHandle = false;
pBarInfo->mLenRatio = 0.0;
// set preferred bar dimensions, according to the state in which
@@ -2870,12 +2870,12 @@ void cbDockPane::RemoveRow( cbRowInfo* pRow )
for ( i = 0; i != pRow->mBars.Count(); ++i )
{
if ( pRow->mBars[i]->mpBarWnd )
pRow->mBars[i]->mpBarWnd->Show( FALSE );
pRow->mBars[i]->mpBarWnd->Show( false );
}
mRows.Remove( pRow );
pRow->mUMgrData.SetDirty(TRUE);
pRow->mUMgrData.SetDirty(true);
}
void cbDockPane::InsertRow( cbRowInfo* pRow, cbRowInfo* pBeforeRow )
@@ -2888,11 +2888,11 @@ void cbDockPane::InsertRow( cbRowInfo* pRow, cbRowInfo* pBeforeRow )
InitLinksForRows();
pRow->mUMgrData.SetDirty(TRUE);
pRow->mUMgrData.SetDirty(true);
size_t i;
for ( i = 0; i != pRow->mBars.Count(); ++i )
pRow->mBars[i]->mUMgrData.SetDirty( TRUE );
pRow->mBars[i]->mUMgrData.SetDirty( true );
SyncRowFlags( pRow );
}
@@ -2997,9 +2997,9 @@ bool cbDockPane::BarPresent( cbBarInfo* pBar )
while( iter.Next() )
if ( &iter.BarInfo() == pBar ) return TRUE;
if ( &iter.BarInfo() == pBar ) return true;
return FALSE;
return false;
}
cbRowInfo* cbDockPane::GetRow( int row )
@@ -3401,7 +3401,7 @@ void cbDockPane::ResizeBar( cbBarInfo* pBar, int ofs,
InsertBar( pBar, pToRow );
mpLayout->RecalcLayout(FALSE);
mpLayout->RecalcLayout(false);
mpLayout->GetUpdatesManager().OnFinishChanges();
mpLayout->GetUpdatesManager().UpdateNow();
@@ -3472,7 +3472,7 @@ cbBarInfo* cbDockPane::GetBarInfoByWindow( wxWindow* pBarWnd )
void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst )
{
pLst->DeleteContents( TRUE );
pLst->DeleteContents( true );
pLst->Clear();
size_t i;
@@ -3560,8 +3560,8 @@ bool cbPluginBase::ProcessEvent(wxEvent& event)
if ( GetNextHandler() && GetNextHandler()->ProcessEvent( event ) )
return TRUE;
return true;
else
return FALSE;
return false;
}

View File

@@ -6,7 +6,7 @@
// Created: ??/10/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows license
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -82,17 +82,17 @@ bool wxDynamicToolBar::Create(wxWindow *parent, const wxWindowID id,
// cut&pasted from wxtbatsmpl.h
if ( ! wxWindow::Create(parent, id, pos, size, style, name) )
return FALSE;
return false;
SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ));
return TRUE;
return true;
}
bool wxDynamicToolBar::Realize(void)
{
// FOR NOW:: nothing
return TRUE;
return true;
}
wxDynamicToolBar::~wxDynamicToolBar(void)
@@ -116,7 +116,7 @@ void wxDynamicToolBar::AddTool( int toolIndex,
pInfo->mpToolWnd = pToolWindow;
pInfo->mIndex = toolIndex;
pInfo->mIsSeparator = FALSE;
pInfo->mIsSeparator = false;
int x,y;
pToolWindow->GetSize( &x, &y );
@@ -238,7 +238,7 @@ void wxDynamicToolBar::AddSeparator( wxWindow* pSepartorWnd )
pInfo->mpToolWnd = pSepartorWnd;
pInfo->mIndex = -1;
pInfo->mIsSeparator = TRUE;
pInfo->mIsSeparator = true;
// Do we draw a separator or is a other object?
if ( pSepartorWnd )
@@ -333,8 +333,8 @@ void wxDynamicToolBar::OnPaint( wxPaintEvent& WXUNUSED(event) )
void wxDynamicToolBar::SizeToolWindows()
{
bool bStateCheckDone = FALSE;
bool bHorzSeparator = FALSE;
bool bStateCheckDone = false;
bool bHorzSeparator = false;
int maxWidth = 0;
int maxHeight = 0;
@@ -371,7 +371,7 @@ void wxDynamicToolBar::SizeToolWindows()
// separators and we do it only once (all to do with performance...)
if (!bStateCheckDone)
{
bStateCheckDone = TRUE;
bStateCheckDone = true;
size_t j;
wxDynToolInfo *pInfo;
@@ -464,7 +464,7 @@ bool wxDynamicToolBar::Layout()
GetPreferredDim( wndDim, result );
SizeToolWindows();
return TRUE;
return true;
}
void wxDynamicToolBar::GetPreferredDim( const wxSize& givenDim, wxSize& prefDim )
@@ -576,12 +576,12 @@ wxToolBarToolBase* wxDynamicToolBar::FindToolForPosition( wxCoord WXUNUSED(x), w
bool wxDynamicToolBar::DoInsertTool( size_t WXUNUSED(pos), wxToolBarToolBase* WXUNUSED(tool) )
{
return TRUE;
return true;
}
bool wxDynamicToolBar::DoDeleteTool( size_t WXUNUSED(pos), wxToolBarToolBase* WXUNUSED(tool) )
{
return TRUE;
return true;
}
void wxDynamicToolBar::DoEnableTool( wxToolBarToolBase* WXUNUSED(tool), bool WXUNUSED(enable) )

View File

@@ -80,7 +80,7 @@ void wxFrameView::Deactivate()
void wxFrameView::CreateLayout()
{
mpLayout = new wxFrameLayout( GetParentFrame(), mpFrameMgr->GetClientWindow(), FALSE );
mpLayout = new wxFrameLayout( GetParentFrame(), mpFrameMgr->GetClientWindow(), false );
}
wxFrameLayout* wxFrameView::GetLayout()
@@ -232,12 +232,12 @@ void wxFrameManager::SyncAllMenus()
{
if ( i != mActiveViewNo )
EnableMenusForView( (wxFrameView*)pNode->GetData(), FALSE );
EnableMenusForView( (wxFrameView*)pNode->GetData(), false );
pNode = pNode->GetNext();
}
EnableMenusForView( GetView( mActiveViewNo ), TRUE );
EnableMenusForView( GetView( mActiveViewNo ), true );
}
/*** public methods ***/
@@ -368,7 +368,7 @@ void wxFrameManager::ActivateView( wxFrameView* pFrmView )
GetParentFrame()->PushEventHandler( pFrmView );
EnableMenusForView( pFrmView, TRUE );
EnableMenusForView( pFrmView, true );
}
void wxFrameManager::SetClinetWindow( wxWindow* pFrameClient )
@@ -402,7 +402,7 @@ void wxFrameManager::DeactivateCurrentView()
if ( pView->mpLayout )
pView->mpLayout->Deactivate();
EnableMenusForView( pView, FALSE );
EnableMenusForView( pView, false );
}
void wxFrameManager::SaveViewsNow()
@@ -420,12 +420,12 @@ void wxFrameManager::SaveViewsNow()
bool wxFrameManager::ReloadViews()
{
return FALSE;
return false;
// TBD: ????
#if 0
if ( mSettingsFile == "" || !wxFileExists( mSettingsFile ) )
return FALSE;
return false;
DestroyViews();
@@ -435,7 +435,7 @@ bool wxFrameManager::ReloadViews()
mStore.SetDataStream( stm );
DoSerialize( mStore );
return TRUE;
return true;
#endif
}

View File

@@ -6,7 +6,7 @@
// Created: 19/10/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -96,7 +96,7 @@ void cbGCUpdatesMgr::OnStartChanges()
// store pane state
pane.mUMgrData.StoreItemState( pane.mBoundsInParent );
pane.mUMgrData.SetDirty( FALSE );
pane.mUMgrData.SetDirty( false );
cbRowInfo* pRow = pane.GetFirstRow();
@@ -106,13 +106,13 @@ void cbGCUpdatesMgr::OnStartChanges()
// store row state
pRow->mUMgrData.StoreItemState( pRow->mBoundsInParent );
pRow->mUMgrData.SetDirty( FALSE );
pRow->mUMgrData.SetDirty( false );
while( pBar )
{
// store bar state
pBar->mUMgrData.StoreItemState( pBar->mBoundsInParent );
pBar->mUMgrData.SetDirty( FALSE );
pBar->mUMgrData.SetDirty( false );
pBar = pBar->mpNext;
}
@@ -164,8 +164,8 @@ void cbGCUpdatesMgr::UpdateNow()
cbBarInfo* pBar = pRow->GetFirstBar();
bool rowChanged = FALSE;
// bool rowBkPainted = FALSE;
bool rowChanged = false;
// bool rowBkPainted = false;
// FIXME:: the below should not be fixed
cbBarInfo* barsToRepaint[128];
@@ -177,7 +177,7 @@ void cbGCUpdatesMgr::UpdateNow()
if ( WasChanged( pRow->mUMgrData, pRow->mBoundsInParent ) )
rowChanged = TRUE;
rowChanged = true;
else
while( pBar )
{
@@ -349,8 +349,8 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
// FIXME FIXME:: excessive!
pClntWnd->Show( FALSE );
pClntWnd->Show( TRUE );
pClntWnd->Show( false );
pClntWnd->Show( true );
// OLD STUFF:: mpLayout->PositionClientWindow();
}
@@ -374,8 +374,8 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
// FIXME FIXME:: there's no other way to repaint non-client area of the wxWindow!!
// so we do *excessive* "hide 'n show"
pWnd->Show(FALSE);
pWnd->Show(TRUE);
pWnd->Show(false);
pWnd->Show(true);
pWnd->Refresh();
}

View File

@@ -6,7 +6,7 @@
// Created: 9/11/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows license
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -45,12 +45,12 @@ cbHintAnimationPlugin::cbHintAnimationPlugin(void)
: mpScrDc( NULL ),
mpAnimTimer( 0 ),
mAnimStarted( FALSE ),
mAnimStarted( false ),
mMorphDelay ( 5 ),
mMaxFrames ( 20 ),
mInClientHintBorder( 4 ),
mAccelerationOn( TRUE )
mAccelerationOn( true )
{}
cbHintAnimationPlugin::cbHintAnimationPlugin( wxFrameLayout* pPanel, int paneMask )
@@ -58,12 +58,12 @@ cbHintAnimationPlugin::cbHintAnimationPlugin( wxFrameLayout* pPanel, int paneMas
: cbPluginBase( pPanel, paneMask ),
mpScrDc( NULL ),
mpAnimTimer( 0 ),
mAnimStarted( FALSE ),
mAnimStarted( false ),
mMorphDelay ( 5 ),
mMaxFrames ( 20 ),
mInClientHintBorder( 4 ),
mAccelerationOn( TRUE )
mAccelerationOn( true )
{}
cbHintAnimationPlugin::~cbHintAnimationPlugin()
@@ -83,7 +83,7 @@ void cbHintAnimationPlugin::OnDrawHintRect( cbDrawHintRectEvent& event )
mPrevRect = event.mRect;
mStopPending = FALSE;
mStopPending = false;
}
if ( !event.mEraseRect )
@@ -113,7 +113,7 @@ void cbHintAnimationPlugin::OnDrawHintRect( cbDrawHintRectEvent& event )
mpAnimTimer->Init( this, mAnimStarted );
mAnimStarted = TRUE;
mAnimStarted = true;
}
else
if ( !mAnimStarted )
@@ -132,7 +132,7 @@ void cbHintAnimationPlugin::OnDrawHintRect( cbDrawHintRectEvent& event )
if ( event.mLastTime && mpAnimTimer )
{
mStopPending = TRUE;
mStopPending = true;
if ( mpAnimTimer->mPrevMorphed.x != POS_UNDEFINED )
@@ -298,9 +298,9 @@ void cbHintAnimTimer::Notify(void)
mpPl->FinishTracking();
mpPl->mStopPending = FALSE;
mpPl->mStopPending = false;
mpPl->mpAnimTimer = NULL;
mpPl->mAnimStarted = FALSE;
mpPl->mAnimStarted = false;
mPrevMorphed.x = POS_UNDEFINED;
@@ -338,7 +338,7 @@ void cbHintAnimTimer::Notify(void)
mpPl->FinishTracking();
mpPl->mpAnimTimer = NULL;
mpPl->mAnimStarted = FALSE;
mpPl->mAnimStarted = false;
mPrevMorphed.x = POS_UNDEFINED;
@@ -392,6 +392,6 @@ bool cbHintAnimTimer::Init( cbHintAnimationPlugin* pAnimPl, bool reinit )
Start( mpPl->mMorphDelay );
return TRUE;
return true;
}

View File

@@ -251,11 +251,11 @@ wxNewBitmapButton::wxNewBitmapButton( const wxBitmap& labelBitmap,
mpFocusedImg ( NULL ),
mDragStarted ( FALSE ),
mIsPressed ( FALSE ),
mIsInFocus ( FALSE ),
mIsToggled ( FALSE ),
mHasFocusedBmp( FALSE ),
mDragStarted ( false ),
mIsPressed ( false ),
mIsInFocus ( false ),
mIsToggled ( false ),
mHasFocusedBmp( false ),
mFiredEventType( firedEventType ),
mBlackPen( wxColour( 0, 0, 0), 1, wxSOLID ),
@@ -263,8 +263,8 @@ wxNewBitmapButton::wxNewBitmapButton( const wxBitmap& labelBitmap,
mGrayPen ( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
mLightPen( wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT), 1, wxSOLID ),
mIsCreated( FALSE ),
mSizeIsSet( FALSE )
mIsCreated( false ),
mSizeIsSet( false )
{
}
@@ -284,7 +284,7 @@ wxNewBitmapButton::wxNewBitmapButton( const wxString& bitmapFileName,
mMarginX( 2 ),
mMarginY( 2 ),
mTextAlignment( alignText ),
mIsSticky( FALSE ),
mIsSticky( false ),
mIsFlat( isFlat ),
mLabelText( labelText ),
mImageFileName( bitmapFileName ),
@@ -295,11 +295,11 @@ wxNewBitmapButton::wxNewBitmapButton( const wxString& bitmapFileName,
mpDisabledImg ( NULL ),
mpFocusedImg ( NULL ),
mDragStarted ( FALSE ),
mIsPressed ( FALSE ),
mIsInFocus ( FALSE ),
mIsToggled ( FALSE ),
mHasFocusedBmp( FALSE ),
mDragStarted ( false ),
mIsPressed ( false ),
mIsInFocus ( false ),
mIsToggled ( false ),
mHasFocusedBmp( false ),
mFiredEventType( wxEVT_COMMAND_MENU_SELECTED ),
mBlackPen( wxColour( 0, 0, 0), 1, wxSOLID ),
@@ -307,8 +307,8 @@ wxNewBitmapButton::wxNewBitmapButton( const wxString& bitmapFileName,
mGrayPen ( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
mLightPen( wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT), 1, wxSOLID ),
mIsCreated( FALSE ),
mSizeIsSet( FALSE )
mIsCreated( false ),
mSizeIsSet( false )
{
}
@@ -473,7 +473,7 @@ void wxNewBitmapButton::RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp,
destDc.Blit( imgPos.x, imgPos.y,
srcBmp->GetWidth()+1,
srcBmp->GetHeight()+1,
&srcDc, 0,0, wxCOPY,TRUE );
&srcDc, 0,0, wxCOPY,true );
}
if ( hasText )
@@ -519,8 +519,8 @@ void wxNewBitmapButton::RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp,
// adjust button size to fit the new dimensions of the label
if ( !mSizeIsSet && 0 )
{
mSizeIsSet = TRUE;
SetSize( -1,-1,
mSizeIsSet = true;
SetSize( wxDefaultPosition.x,wxDefaultPosition.y,
destBmp->GetWidth() + mMarginX*2,
destBmp->GetHeight() + mMarginY*2, 0
);
@@ -537,12 +537,12 @@ void wxNewBitmapButton::RenderAllLabelImages()
{
if ( !mIsCreated )
return;
RenderLabelImage( mpDisabledImg, &mDepressedBmp, FALSE );
RenderLabelImage( mpPressedImg, &mDepressedBmp, TRUE, TRUE );
RenderLabelImage( mpDepressedImg, &mDepressedBmp, TRUE, FALSE );
RenderLabelImage( mpDisabledImg, &mDepressedBmp, false );
RenderLabelImage( mpPressedImg, &mDepressedBmp, true, true );
RenderLabelImage( mpDepressedImg, &mDepressedBmp, true, false );
if ( mHasFocusedBmp )
{
RenderLabelImage( mpFocusedImg, &mFocusedBmp, TRUE, FALSE );
RenderLabelImage( mpFocusedImg, &mFocusedBmp, true, false );
}
}
@@ -554,24 +554,24 @@ void wxNewBitmapButton::RenderLabelImages()
if ( !IsEnabled() )
{
RenderLabelImage( mpDisabledImg, &mDepressedBmp, FALSE );
RenderLabelImage( mpDisabledImg, &mDepressedBmp, false );
}
else
if ( mIsPressed )
RenderLabelImage( mpPressedImg, &mDepressedBmp, TRUE, TRUE );
RenderLabelImage( mpPressedImg, &mDepressedBmp, true, true );
else
{
if ( mIsInFocus )
{
if ( mHasFocusedBmp )
RenderLabelImage( mpFocusedImg, &mFocusedBmp, TRUE, FALSE );
RenderLabelImage( mpFocusedImg, &mFocusedBmp, true, false );
else
RenderLabelImage( mpDepressedImg, &mDepressedBmp, TRUE, FALSE );
RenderLabelImage( mpDepressedImg, &mDepressedBmp, true, false );
}
else
RenderLabelImage( mpDepressedImg, &mDepressedBmp, TRUE, FALSE );
RenderLabelImage( mpDepressedImg, &mDepressedBmp, true, false );
}
}
@@ -579,13 +579,13 @@ bool wxNewBitmapButton::Toggle(bool enable)
{
if ( mIsToggled == enable )
{
return FALSE;
return false;
}
mIsToggled = enable;
Refresh();
return TRUE;
return true;
}
bool wxNewBitmapButton::Enable(bool enable)
@@ -594,12 +594,12 @@ bool wxNewBitmapButton::Enable(bool enable)
{
if ( mIsInFocus )
{
mIsInFocus = FALSE;
mIsInFocus = false;
}
if ( mIsPressed )
{
mIsPressed = FALSE;
mIsPressed = false;
}
Refresh();
@@ -674,8 +674,8 @@ void wxNewBitmapButton::SetAlignments( int alignText,
void wxNewBitmapButton::OnLButtonDown( wxMouseEvent& WXUNUSED(event) )
{
mDragStarted = TRUE;
mIsPressed = TRUE;
mDragStarted = true;
mIsPressed = true;
Refresh();
}
@@ -684,8 +684,8 @@ void wxNewBitmapButton::OnLButtonUp( wxMouseEvent& event )
if ( !mDragStarted )
return;
mDragStarted = FALSE;
mIsPressed = FALSE;
mDragStarted = false;
mIsPressed = false;
Refresh();
if ( IsInWindow( event.m_x, event.m_y ) )
@@ -713,7 +713,7 @@ void wxNewBitmapButton::OnMouseEnter( wxMouseEvent& WXUNUSED(event) )
if ( !mIsInFocus )
{
mIsInFocus = TRUE;
mIsInFocus = true;
}
if ( prevIsInFocus != mIsInFocus )
{
@@ -727,8 +727,8 @@ void wxNewBitmapButton::OnMouseLeave( wxMouseEvent& WXUNUSED(event) )
bool prevIsPressed = mIsPressed;
if ( mIsInFocus )
{
mIsInFocus = FALSE;
mIsPressed = FALSE;
mIsInFocus = false;
mIsPressed = false;
}
if ( prevIsInFocus != mIsInFocus || prevIsPressed != mIsPressed )
{
@@ -744,7 +744,7 @@ void wxNewBitmapButton::OnSize( wxSizeEvent& WXUNUSED(event) )
void wxNewBitmapButton::Reshape( )
{
bool wasCreated = mIsCreated;
mIsCreated = TRUE;
mIsCreated = true;
if ( !wasCreated )
{

View File

@@ -6,7 +6,7 @@
// Created: 06/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -103,17 +103,17 @@ END_EVENT_TABLE()
cbPaneDrawPlugin::cbPaneDrawPlugin(void)
: mResizeStarted ( FALSE ),
: mResizeStarted ( false ),
mResizeCursorOn ( FALSE ),
mResizeCursorOn ( false ),
mpDraggedBar ( NULL ),
mpResizedRow ( NULL ),
mRowHandleHitted ( FALSE ),
mIsUpperHandle ( FALSE ),
mBarHandleHitted ( FALSE ),
mIsLeftHandle ( FALSE ),
mBarContentHitted ( FALSE ),
mRowHandleHitted ( false ),
mIsUpperHandle ( false ),
mBarHandleHitted ( false ),
mIsLeftHandle ( false ),
mBarContentHitted ( false ),
mpClntDc ( NULL ),
mpPane ( NULL )
@@ -125,17 +125,17 @@ cbPaneDrawPlugin::cbPaneDrawPlugin( wxFrameLayout* pPanel, int paneMask )
// bar-row resizing state varaibles
mResizeStarted ( FALSE ),
mResizeStarted ( false ),
mResizeCursorOn ( FALSE ),
mResizeCursorOn ( false ),
mpDraggedBar ( NULL ),
mpResizedRow ( NULL ),
mRowHandleHitted ( FALSE ),
mIsUpperHandle ( FALSE ),
mBarHandleHitted ( FALSE ),
mIsLeftHandle ( FALSE ),
mBarContentHitted ( FALSE ),
mRowHandleHitted ( false ),
mIsUpperHandle ( false ),
mBarHandleHitted ( false ),
mIsLeftHandle ( false ),
mBarContentHitted ( false ),
mpClntDc ( NULL ),
mpPane ( NULL )
@@ -254,9 +254,9 @@ void cbPaneDrawPlugin::OnMouseMove( cbMotionEvent& event )
bool prevWasRowHandle = mRowHandleHitted;
mBarContentHitted = FALSE;
mBarHandleHitted = FALSE;
mRowHandleHitted = FALSE;
mBarContentHitted = false;
mBarHandleHitted = false;
mRowHandleHitted = false;
int testResult =
event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
@@ -275,9 +275,9 @@ void cbPaneDrawPlugin::OnMouseMove( cbMotionEvent& event )
mpLayout->ReleaseEventsFromPane( event.mpPane );
mpLayout->ReleaseEventsFromPlugin( this );
mResizeCursorOn = FALSE;
mResizeCursorOn = false;
mBarContentHitted = TRUE;
mBarContentHitted = true;
// In Windows, at least, the frame needs to have a null cursor
// else child windows (such as text windows) inherit the cursor
@@ -305,7 +305,7 @@ void cbPaneDrawPlugin::OnMouseMove( cbMotionEvent& event )
else
pCurs = mpLayout->mpHorizCursor;
mRowHandleHitted = TRUE;
mRowHandleHitted = true;
mIsUpperHandle = ( testResult == CB_UPPER_ROW_HANDLE_HITTED );
}
else
@@ -318,7 +318,7 @@ void cbPaneDrawPlugin::OnMouseMove( cbMotionEvent& event )
else
pCurs = mpLayout->mpVertCursor;
mBarHandleHitted = TRUE;
mBarHandleHitted = true;
mIsLeftHandle = ( testResult == CB_LEFT_BAR_HANDLE_HITTED );
}
@@ -336,7 +336,7 @@ void cbPaneDrawPlugin::OnMouseMove( cbMotionEvent& event )
mpLayout->GetParentFrame().SetCursor( *pCurs );
}
mResizeCursorOn = TRUE;
mResizeCursorOn = true;
// handled is being dragged now, thus event is "eaten" by this plugin
@@ -358,7 +358,7 @@ void cbPaneDrawPlugin::OnMouseMove( cbMotionEvent& event )
mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
#endif
mResizeCursorOn = FALSE;
mResizeCursorOn = false;
}
event.Skip(); // pass event to the next plugin
@@ -406,14 +406,14 @@ void cbPaneDrawPlugin::OnLButtonDown( cbLeftDownEvent& event )
if ( mResizeCursorOn )
{
mResizeStarted = TRUE;
mResizeStarted = true;
mDragOrigin = event.mPos;
// setup constraints for the dragging handle
int from, till;
mHandleOfs = 0;
mHandleIsVertical = FALSE;
mHandleIsVertical = false;
if ( mRowHandleHitted )
@@ -424,7 +424,7 @@ void cbPaneDrawPlugin::OnLButtonDown( cbLeftDownEvent& event )
if ( mRowHandleHitted )
{
mHandleIsVertical = ( event.mpPane->IsHorizontal() ) ? FALSE : TRUE;
mHandleIsVertical = ( event.mpPane->IsHorizontal() ) ? false : true;
mHandleDragArea.x = 0;
mHandleDragArea.width = event.mpPane->mPaneWidth;
@@ -447,7 +447,7 @@ void cbPaneDrawPlugin::OnLButtonDown( cbLeftDownEvent& event )
// cbRowInfo& rowInfo = *mpDraggedBar->mpRow;
wxRect& bounds = mpDraggedBar->mBounds;
mHandleIsVertical = ( event.mpPane->IsHorizontal() ) ? TRUE : FALSE;
mHandleIsVertical = ( event.mpPane->IsHorizontal() ) ? true : false;
mHandleDragArea.x = from;
mHandleDragArea.width = till - from;
@@ -505,8 +505,8 @@ void cbPaneDrawPlugin::OnLButtonUp( cbLeftUpEvent& event )
{
DrawDraggedHandle( event.mPos, *event.mpPane );
mResizeStarted = FALSE;
mResizeCursorOn = FALSE;
mResizeStarted = false;
mResizeCursorOn = false;
mpLayout->ReleaseEventsFromPane( event.mpPane );
mpLayout->ReleaseEventsFromPlugin( this );
@@ -604,11 +604,11 @@ void cbPaneDrawPlugin::OnSizeBarWindow( cbSizeBarWndEvent& event )
if ( !bar.mpBarWnd->IsShown() )
bar.mpBarWnd->Show( TRUE );
bar.mpBarWnd->Show( true );
}
else
// hide bar if not visible
bar.mpBarWnd->Show( FALSE );
bar.mpBarWnd->Show( false );
event.Skip(); // pass event to the next plugin in the chain
}

View File

@@ -6,7 +6,7 @@
// Created: 06/10/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -66,10 +66,10 @@ cbRowDragPlugin::cbRowDragPlugin(void)
mTrianInnerColor ( 0,0,255 ),
mTrianInnerPen ( mTrianInnerColor, 1, wxSOLID ),
mDragStarted ( FALSE ),
mDecisionMode ( FALSE ),
mDragStarted ( false ),
mDecisionMode ( false ),
mCurDragOfs ( 0 ),
mCaptureIsOn ( FALSE ),
mCaptureIsOn ( false ),
mSvTopMargin ( -1 ),
mSvBottomMargin ( -1 ),
mSvLeftMargin ( -1 ),
@@ -95,10 +95,10 @@ cbRowDragPlugin::cbRowDragPlugin( wxFrameLayout* pLayout, int paneMask )
mTrianInnerColor ( 0,0,255 ),
mTrianInnerPen ( mTrianInnerColor, 1, wxSOLID ),
mDragStarted ( FALSE ),
mDecisionMode ( FALSE ),
mDragStarted ( false ),
mDecisionMode ( false ),
mCurDragOfs ( 0 ),
mCaptureIsOn ( FALSE ),
mCaptureIsOn ( false ),
mSvTopMargin ( -1 ),
mSvBottomMargin ( -1 ),
mSvLeftMargin ( -1 ),
@@ -152,8 +152,8 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event )
//wxPoint drg = mDragOrigin;
//int dif = event.mPos.x - mDragOrigin.x;
mDragStarted = TRUE;
mDecisionMode = FALSE;
mDragStarted = true;
mDecisionMode = false;
mDragOrigin = pos;
PrepareForRowDrag();
@@ -166,16 +166,16 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event )
cbRowInfo* pRow = GetFirstRow();
bool focusFound = FALSE;
bool focusFound = false;
while( pRow )
{
if ( HitTestRowDragHint( pRow, pos ) )
{
CheckPrevItemInFocus( pRow, -1 );
SetMouseCapture( TRUE );
SetMouseCapture( true );
focusFound = TRUE;
focusFound = true;
mpRowInFocus = pRow;
mCollapsedIconInFocus = -1;
@@ -194,9 +194,9 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event )
if ( HitTestCollapsedRowIcon( i, pos ) )
{
CheckPrevItemInFocus( NULL, i );
SetMouseCapture( TRUE );
SetMouseCapture( true );
focusFound = TRUE;
focusFound = true;
mCollapsedIconInFocus = i;
mpRowInFocus = NULL;
@@ -212,7 +212,7 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event )
mpRowInFocus = NULL;
mCollapsedIconInFocus = -1;
SetMouseCapture( FALSE );
SetMouseCapture( false );
}
if ( !ItemIsInFocus() )
@@ -248,14 +248,14 @@ void cbRowDragPlugin::OnLButtonDown( cbLeftDownEvent& event )
if ( ItemIsInFocus() )
{
mDecisionMode = TRUE;
mDecisionMode = true;
wxPoint pos = event.mPos;
mpPane->PaneToFrame( &pos.x, &pos.y );
mDragOrigin = pos;
SetMouseCapture( TRUE );
SetMouseCapture( true );
}
else
// propagate event to other plugins
@@ -276,10 +276,10 @@ void cbRowDragPlugin::OnLButtonUp ( cbLeftUpEvent& event )
{
cbDockPane* pPane = mpPane;
SetMouseCapture( FALSE );
SetMouseCapture( false );
mDecisionMode = FALSE;
mDragStarted = FALSE;
mDecisionMode = false;
mDragStarted = false;
wxPoint frmPos = event.mPos;
pPane->PaneToFrame( &frmPos.x, &frmPos.y );
@@ -322,19 +322,19 @@ void cbRowDragPlugin::OnLButtonUp ( cbLeftUpEvent& event )
mpLayout->GetUpdatesManager().OnStartChanges();
pRow->mUMgrData.SetDirty(TRUE);
pRow->mUMgrData.SetDirty(true);
cbBarInfo* pBar = mpRowInFocus->mBars[0];
while ( pBar )
{
pBar->mUMgrData.SetDirty(TRUE);
pBar->mUMgrData.SetDirty(true);
if ( pBar->mpBarWnd )
{
// do complete refresh
pBar->mpBarWnd->Show(FALSE);
pBar->mpBarWnd->Show(TRUE);
pBar->mpBarWnd->Show(false);
pBar->mpBarWnd->Show(true);
}
pBar = pBar->mpNext;
@@ -355,15 +355,15 @@ void cbRowDragPlugin::OnLButtonUp ( cbLeftUpEvent& event )
mpRowInFocus = NULL;
mpLayout->RecalcLayout(FALSE);
mpLayout->RecalcLayout(false);
// finish change "transaction"
mpLayout->GetUpdatesManager().OnFinishChanges();
mpLayout->GetUpdatesManager().UpdateNow();
// finish drag action
SetMouseCapture( FALSE );
mDragStarted = FALSE;
SetMouseCapture( false );
mDragStarted = false;
}
}
@@ -378,7 +378,7 @@ void cbRowDragPlugin::OnDrawPaneBackground ( cbDrawPaneDecorEvent& event )
// first, let other plugins add their decorations now
GetNextHandler()->ProcessEvent( event );
event.Skip(FALSE);
event.Skip(false);
}
wxClientDC dc( &mpLayout->GetParentFrame() );
@@ -402,13 +402,13 @@ void cbRowDragPlugin::OnDrawPaneBackground ( cbDrawPaneDecorEvent& event )
while( pRow )
{
DrawRowDragHint( pRow, dc, FALSE );
DrawRowDragHint( pRow, dc, false );
pRow = pRow->mpNext;
}
for( int i = 0; i != cnt; ++i )
DrawCollapsedRowIcon(i, dc, FALSE );
DrawCollapsedRowIcon(i, dc, false );
}
int cbRowDragPlugin::GetHRowsCountForPane( cbDockPane* pPane )
@@ -514,11 +514,11 @@ void cbRowDragPlugin::UnhighlightItemInFocus()
if ( mpRowInFocus )
DrawRowDragHint( mpRowInFocus, dc, FALSE );
DrawRowDragHint( mpRowInFocus, dc, false );
else
if ( mCollapsedIconInFocus != - 1 )
DrawCollapsedRowIcon( mCollapsedIconInFocus, dc, FALSE );
DrawCollapsedRowIcon( mCollapsedIconInFocus, dc, false );
}
void cbRowDragPlugin::ShowDraggedRow( int offset )
@@ -761,7 +761,7 @@ void cbRowDragPlugin::CollapseRow( cbRowInfo* pRow )
// hide it
if ( pBar->mpBarWnd )
pBar->mpBarWnd->Show( FALSE );
pBar->mpBarWnd->Show( false );
pBar->mState = wxCBAR_HIDDEN;
@@ -781,7 +781,7 @@ void cbRowDragPlugin::CollapseRow( cbRowInfo* pRow )
SetPaneMargins();
mpLayout->RecalcLayout(FALSE);
mpLayout->RecalcLayout(false);
mpRowInFocus = NULL;
@@ -857,7 +857,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx )
SetPaneMargins();
mpLayout->RecalcLayout(FALSE);
mpLayout->RecalcLayout(false);
mCollapsedIconInFocus = -1;
@@ -879,7 +879,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx )
SetPaneMargins();
mpLayout->RecalcLayout(FALSE);
mpLayout->RecalcLayout(false);
mCollapsedIconInFocus = -1;
@@ -905,7 +905,7 @@ void cbRowDragPlugin::InsertDraggedRowBefore( cbRowInfo* pBeforeRow )
//wxClientDC dc( &mpLayout->GetParentFrame() );
//mpPane->PaintRow( mpRowInFocus, dc );
//DrawRowDragHint( mpRowInFocus, dc, FALSE );
//DrawRowDragHint( mpRowInFocus, dc, false );
}
}
@@ -925,12 +925,12 @@ void cbRowDragPlugin::CheckPrevItemInFocus( cbRowInfo* pRow, int iconIdx )
if ( iconIdx != - 1 )
DrawCollapsedRowIcon( iconIdx, dc, TRUE );
DrawCollapsedRowIcon( iconIdx, dc, true );
else
if ( pRow != NULL )
DrawRowDragHint( pRow, dc, TRUE );
DrawRowDragHint( pRow, dc, true );
}
cbRowInfo* cbRowDragPlugin::GetFirstRow()

View File

@@ -270,7 +270,7 @@ void cbRowLayoutPlugin::FitBarsToRange( int from, int till,
pBar = pFromBar;
int prevX = from;
bool hasNotFixedBars = FALSE;
bool hasNotFixedBars = false;
while ( pBar != pTillBar )
{
@@ -278,7 +278,7 @@ void cbRowLayoutPlugin::FitBarsToRange( int from, int till,
if ( !pBar->IsFixed() )
{
hasNotFixedBars = TRUE;
hasNotFixedBars = true;
freeSpc -= bounds.width;
}
@@ -449,7 +449,7 @@ void cbRowLayoutPlugin::ApplyLengthRatios( cbRowInfo* pRow )
double unit = freeSpc / pcntSum;
bool haveSquished = FALSE;
bool haveSquished = false;
for ( i = 0; i != pRow->mBars.Count(); ++i )
{
@@ -459,7 +459,7 @@ void cbRowLayoutPlugin::ApplyLengthRatios( cbRowInfo* pRow )
if ( int( unit * bar.mLenRatio ) < mpPane->mProps.mMinCBarDim.x )
{
haveSquished = TRUE;
haveSquished = true;
bar.mBounds.width = -1; // mark as "squished"
@@ -507,14 +507,14 @@ void cbRowLayoutPlugin::DetectBarHandles( cbRowInfo* pRow )
{
// first pass from left to right (detect left-side handles)
bool foundNotFixed = FALSE;
bool foundNotFixed = false;
size_t i;
for ( i = 0; i != pRow->mBars.Count(); ++i )
{
cbBarInfo& bar = *pRow->mBars[i];
bar.mHasLeftHandle = FALSE;
bar.mHasLeftHandle = false;
if ( !bar.IsFixed() )
{
@@ -523,21 +523,21 @@ void cbRowLayoutPlugin::DetectBarHandles( cbRowInfo* pRow )
if ( bar.mpPrev &&
bar.mpPrev->IsFixed() )
bar.mHasLeftHandle = TRUE;
bar.mHasLeftHandle = true;
foundNotFixed = TRUE;
foundNotFixed = true;
}
}
// pass from right to left (detect right-side handles)
foundNotFixed = FALSE;
foundNotFixed = false;
cbBarInfo* pBar = pRow->mBars[ pRow->mBars.Count() - 1 ];
while( pBar )
{
pBar->mHasRightHandle = FALSE;
pBar->mHasRightHandle = false;
if ( !pBar->IsFixed() )
{
@@ -545,9 +545,9 @@ void cbRowLayoutPlugin::DetectBarHandles( cbRowInfo* pRow )
if ( pBar->mpNext )
pBar->mHasRightHandle = TRUE;
pBar->mHasRightHandle = true;
foundNotFixed = TRUE;
foundNotFixed = true;
}
pBar = pBar->mpPrev;
@@ -962,8 +962,8 @@ void cbRowLayoutPlugin::OnRemoveBar ( cbRemoveBarEvent& event )
// rest bar information after removing it from the row
pBar->mpRow = NULL;
pBar->mHasLeftHandle = FALSE;
pBar->mHasRightHandle = FALSE;
pBar->mHasLeftHandle = false;
pBar->mHasRightHandle = false;
mpPane->InitLinksForRow( pRow ); // relink "mpNext/mpPrev"s
@@ -982,7 +982,7 @@ void cbRowLayoutPlugin::OnRemoveBar ( cbRemoveBarEvent& event )
// force repainting of bars, in the row, from which the bar was removed
// FIXME:: really needed?
pRow->mBars[0]->mUMgrData.SetDirty(TRUE);
pRow->mBars[0]->mUMgrData.SetDirty(true);
// re-setup mHasOnlyFixedBars flag for the row information
event.mpPane->SyncRowFlags( pRow );
@@ -1059,22 +1059,22 @@ void cbRowLayoutPlugin::OnLayoutRows( cbLayoutRowsEvent& event )
if ( mpPane->mAlignment == FL_ALIGN_TOP ||
mpPane->mAlignment == FL_ALIGN_LEFT )
{
row.mHasLowerHandle = TRUE;
row.mHasLowerHandle = true;
row.mHasUpperHandle = FALSE;
row.mHasUpperHandle = false;
}
else
{
row.mHasUpperHandle = TRUE;
row.mHasUpperHandle = true;
row.mHasLowerHandle = FALSE;
row.mHasLowerHandle = false;
}
}
else
{
// otherwise, rows with fixed-bars only, have no height-resizing handles
row.mHasUpperHandle = FALSE;
row.mHasLowerHandle = FALSE;
row.mHasUpperHandle = false;
row.mHasLowerHandle = false;
}
// setup vertical positions for items in the row
@@ -1216,7 +1216,7 @@ void cbRowLayoutPlugin::OnResizeRow( cbResizeRowEvent& event )
else
event.mpPane->SetRowHeight( pTheRow, pTheRow->mRowHeight + ofs );
mpLayout->RecalcLayout(FALSE);
mpLayout->RecalcLayout(false);
mpLayout->GetUpdatesManager().OnFinishChanges();
mpLayout->GetUpdatesManager().UpdateNow();

File diff suppressed because it is too large Load Diff

View File

@@ -75,7 +75,7 @@ void cbSimpleUpdatesMgr::OnStartChanges()
cbDockPane& pane = *panes[n];
// store pane state
pane.mUMgrData.StoreItemState( pane.mBoundsInParent );
pane.mUMgrData.SetDirty( FALSE );
pane.mUMgrData.SetDirty( false );
for( size_t i = 0; i != pane.GetRowList().Count(); ++i )
{
@@ -83,7 +83,7 @@ void cbSimpleUpdatesMgr::OnStartChanges()
// store row state
row.mUMgrData.StoreItemState( row.mBoundsInParent );
row.mUMgrData.SetDirty( FALSE );
row.mUMgrData.SetDirty( false );
for( size_t k = 0; k != row.mBars.Count(); ++k )
{
@@ -91,7 +91,7 @@ void cbSimpleUpdatesMgr::OnStartChanges()
// store bar state
bar.mUMgrData.StoreItemState( bar.mBoundsInParent );
bar.mUMgrData.SetDirty( FALSE );
bar.mUMgrData.SetDirty( false );
}
}
}
@@ -163,7 +163,7 @@ void cbSimpleUpdatesMgr::UpdateNow()
wxDC* pDc = NULL;
bool rowChanged = FALSE;
bool rowChanged = false;
// FIXME:: the below should not be fixed
cbBarInfo* barsToRepaint[256];
@@ -173,7 +173,7 @@ void cbSimpleUpdatesMgr::UpdateNow()
if ( WasChanged( row.mUMgrData, row.mBoundsInParent ) )
rowChanged = TRUE;
rowChanged = true;
else
for( size_t k = 0; k != row.mBars.Count(); ++k )
@@ -274,8 +274,8 @@ void cbSimpleUpdatesMgr::UpdateNow()
pBar->mpBarWnd->Refresh();
// FIXME::
//info.mpBarWnd->Show(FALSE);
//info.mpBarWnd->Show(TRUE);
//info.mpBarWnd->Show(false);
//info.mpBarWnd->Show(true);
}
pNode = pNode->GetNext();