diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-06 12:27:43 +0000 |
---|---|---|
committer | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-06 12:27:43 +0000 |
commit | f2dd0f5ed49e404ff4be0fe81b614fc4af157d76 (patch) | |
tree | f75b5808825d0d88cef080effbc6e970170f4546 /vcl/source | |
parent | 5c795df0452046ad2aa8d0ec05092133e3e4ebc3 (diff) |
#i121442# - Allow redrawing a single status bar item
A StatusbarController that draws its status bar item may need to trigger
a repainting of its item when the feature state changes. Currently, the
only way to trigger this redraw is by changing the item text or the item
data, so that the vcl implementation calls ImplDrawItem; this is rather
implementation-specific.
Notes
Notes:
merged as: c4ae127b6063b53df4592d6b37ea0f38a892d8c1
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/status.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index f633e4c7b85b..306cec28d44b 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1439,6 +1439,25 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) } } +void StatusBar::RedrawItem( sal_uInt16 nItemId ) +{ + if ( mbFormat ) + return; + + sal_uInt16 nPos = GetItemPos( nItemId ); + if ( nPos == STATUSBAR_ITEM_NOTFOUND ) + return; + + ImplStatusItem* pItem = mpItemList->GetObject( nPos ); + if ( pItem && (pItem->mnBits & SIB_USERDRAW) && + pItem->mbVisible && ImplIsItemUpdate() ) + { + Update(); + ImplDrawItem( sal_True, nPos, sal_False, sal_False ); + Flush(); + } +} + // ----------------------------------------------------------------------- void* StatusBar::GetItemData( sal_uInt16 nItemId ) const |