summaryrefslogtreecommitdiff
path: root/svtools/source/toolpanel/tabbargeometry.hxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-03-09 14:50:09 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-03-09 14:50:09 +0100
commit02f32a1cdcb01320aa7a6205da11fa526c420260 (patch)
treed3afb2dbf47ebdf99d5ecd439bd8cd976b994833 /svtools/source/toolpanel/tabbargeometry.hxx
parenta3cfa3c7fe52422a1df4a6b55ab33a80e38bbcea (diff)
slidecopy: hold a render-device (normalized, i.e. as if top-aligned), on which all items are rendered the same.
This hopefully opens the door for future changes, i.e. proper native tab item rendering (without spacing between the tabs). Not finished, yet. Only VCL-based rendering has been implemented by now, tab item and toolbox item rendering to follow.
Diffstat (limited to 'svtools/source/toolpanel/tabbargeometry.hxx')
-rw-r--r--svtools/source/toolpanel/tabbargeometry.hxx38
1 files changed, 2 insertions, 36 deletions
diff --git a/svtools/source/toolpanel/tabbargeometry.hxx b/svtools/source/toolpanel/tabbargeometry.hxx
index 57bf3422cf8e..5e798e690116 100644
--- a/svtools/source/toolpanel/tabbargeometry.hxx
+++ b/svtools/source/toolpanel/tabbargeometry.hxx
@@ -29,6 +29,7 @@
#include "svtools/toolpanel/tabalignment.hxx"
+#include "inset.hxx"
#include "tabitemdescriptor.hxx"
#include <tools/gen.hxx>
@@ -80,32 +81,13 @@ namespace svt
};
//==================================================================================================================
- //= Inset
- //==================================================================================================================
- struct Inset
- {
- long nLeft;
- long nRight;
- long nTop;
- long nBottom;
-
- Inset()
- :nLeft(0)
- ,nRight(0)
- ,nTop(0)
- ,nBottom(0)
- {
- }
- };
-
- //==================================================================================================================
//= TabBarGeometry
//==================================================================================================================
class TabBarGeometry_Impl;
class TabBarGeometry
{
public:
- TabBarGeometry( const TabAlignment i_eAlignment, const TabItemContent i_eItemContent );
+ TabBarGeometry( const TabItemContent i_eItemContent );
~TabBarGeometry();
// retrieves the rectangle to be occupied by the button for scrolling backward through the items
@@ -115,23 +97,10 @@ namespace svt
// retrieves the rectangle to be occupied by the button for scrolling forward through the items
const Rectangle& getButtonForwardRect() const { return m_aButtonForwardRect; }
- inline TabAlignment getAlignment() const { return m_eTabAlignment; }
-
inline TabItemContent
getItemContent() const { return m_eTabItemContent; }
inline void setItemContent( const TabItemContent i_eItemContent ) { m_eTabItemContent = i_eItemContent; }
- inline bool isVertical() const
- {
- return ( m_eTabAlignment == TABS_LEFT )
- || ( m_eTabAlignment == TABS_RIGHT );
- }
-
- inline Rectangle getTransformed( const Rectangle& i_rNormalizedRect ) const
- {
- return m_aNormalizedPlayground.getTransformed( i_rNormalizedRect, m_eTabAlignment );
- }
-
/** adjusts the sizes of the buttons and the item's playground, plus the sizes of the items
*/
void relayout( const Size& i_rActualOutputSize, ItemDescriptors& io_rItems );
@@ -148,13 +117,10 @@ namespace svt
bool impl_fitItems( ItemDescriptors& io_rItems ) const;
private:
- /// specifies the alignment of the tab bar
- const TabAlignment m_eTabAlignment;
/// specifies the content to be displayed in the tab items
TabItemContent m_eTabItemContent;
/// specifies the inset to be used in the items area, depends on the actual alignment
Inset m_aItemsInset;
- NormalizedArea m_aNormalizedPlayground;
Rectangle m_aButtonBackRect;
Rectangle m_aItemsRect;
Rectangle m_aButtonForwardRect;