diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-07 22:36:24 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-07 22:36:24 +0200 |
commit | 6f5988cdd0eb19dc1c4316db9f3a38787fbad2e5 (patch) | |
tree | e3fb87da4139d4019b72db7c6550ed892552cee6 /svtools/source/toolpanel/toolpaneldrawer.hxx | |
parent | a912db019040b901bdd05a17b319316004c1a663 (diff) |
slidecopy: outsourced the TaskPane/ToolPanel's drawer (TitleBar, type TBT_CONTROL_TITLE) from sd to svtools, to be used with generic tool panel decks, not only within sd
diff -r b53c58c139b0 -r 348318a2bab4 default_images/sd/res/triangle_down.png
Binary file default_images/sd/res/triangle_down.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/sd/res/triangle_down_hc.png
Binary file default_images/sd/res/triangle_down_hc.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/sd/res/triangle_right.png
Binary file default_images/sd/res/triangle_right.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/sd/res/triangle_right_hc.png
Binary file default_images/sd/res/triangle_right_hc.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/svtools/res/triangle_down.png
Binary file default_images/svtools/res/triangle_down.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/svtools/res/triangle_down_hc.png
Binary file default_images/svtools/res/triangle_down_hc.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/svtools/res/triangle_right.png
Binary file default_images/svtools/res/triangle_right.png has changed
diff -r b53c58c139b0 -r 348318a2bab4 default_images/svtools/res/triangle_right_hc.png
Binary file default_images/svtools/res/triangle_right_hc.png has changed
Diffstat (limited to 'svtools/source/toolpanel/toolpaneldrawer.hxx')
-rw-r--r-- | svtools/source/toolpanel/toolpaneldrawer.hxx | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/svtools/source/toolpanel/toolpaneldrawer.hxx b/svtools/source/toolpanel/toolpaneldrawer.hxx new file mode 100644 index 000000000000..e4f00badb78f --- /dev/null +++ b/svtools/source/toolpanel/toolpaneldrawer.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include <vcl/window.hxx> +#include <vcl/virdev.hxx> + +//...................................................................................................................... +namespace svt +{ +//...................................................................................................................... + + //================================================================================================================== + //= ToolPanelDrawer + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + class ToolPanelDrawer : public Window + { + public: + ToolPanelDrawer( Window& i_rParent ); + ~ToolPanelDrawer(); + + long GetPreferredHeightPixel(); + + void SetExpanded( const bool i_bExpanded ); + + virtual void Paint( const Rectangle& i_rBoundingBox ); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void DataChanged( const DataChangedEvent& i_rEvent ); + virtual void SetText( const String& i_rText ); + + private: + Rectangle impl_calcTextBoundingBox(); + Rectangle impl_calcTitleBarBox( const Rectangle& i_rTextBox ); + void impl_paintBackground( const Rectangle& i_rTitleBarBox ); + USHORT impl_getTextStyle(); + void impl_paintFocusIndicator( const Rectangle& i_rTextBox ); + Rectangle impl_paintExpansionIndicator( const Rectangle& i_rTextBox ); + Image impl_getExpansionIndicator() const; + + private: + ::std::auto_ptr< VirtualDevice > m_pPaintDevice; + bool m_bFocused; + bool m_bExpanded; + }; + +//...................................................................................................................... +} // namespace svt +//...................................................................................................................... |