Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
34f19860
Kaydet (Commit)
34f19860
authored
May 11, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor ToolPanelDrawer to use RenderContext
Change-Id: Iee3d2801a257f26673cae5abf5614ed4382b5e6b
üst
373edbd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
42 deletions
+29
-42
toolpaneldrawer.cxx
svtools/source/toolpanel/toolpaneldrawer.cxx
+14
-18
toolpaneldrawer.hxx
svtools/source/toolpanel/toolpaneldrawer.hxx
+15
-24
No files found.
svtools/source/toolpanel/toolpaneldrawer.cxx
Dosyayı görüntüle @
34f19860
...
...
@@ -56,10 +56,10 @@ namespace svt
}
void
DrawerVisualization
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
i_rBoundingBox
)
void
DrawerVisualization
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
i_rBoundingBox
)
{
Window
::
Paint
(
rRenderContext
,
i_rBoundingBox
);
m_rDrawer
.
Paint
();
m_rDrawer
.
Paint
(
rRenderContext
);
}
...
...
@@ -105,29 +105,25 @@ namespace svt
}
void
ToolPanelDrawer
::
Paint
()
void
ToolPanelDrawer
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
)
{
m_pPaintDevice
->
SetMapMode
(
GetMapMode
()
);
m_pPaintDevice
->
SetOutputSize
(
GetOutputSizePixel
()
);
m_pPaintDevice
->
SetSettings
(
GetSettings
()
);
m_pPaintDevice
->
SetDrawMode
(
GetDrawMode
()
);
m_pPaintDevice
->
SetMapMode
(
rRenderContext
.
GetMapMode
()
);
m_pPaintDevice
->
SetOutputSize
(
rRenderContext
.
GetOutputSizePixel
()
);
m_pPaintDevice
->
SetSettings
(
rRenderContext
.
GetSettings
()
);
m_pPaintDevice
->
SetDrawMode
(
rRenderContext
.
GetDrawMode
()
);
const
Rectangle
aTextBox
(
impl_calcTextBoundingBox
()
);
impl_paintBackground
(
impl_calcTitleBarBox
(
aTextBox
)
);
const
Rectangle
aTextBox
(
impl_calcTextBoundingBox
()
);
impl_paintBackground
(
impl_calcTitleBarBox
(
aTextBox
)
);
Rectangle
aFocusBox
(
impl_paintExpansionIndicator
(
aTextBox
)
);
Rectangle
aFocusBox
(
impl_paintExpansionIndicator
(
aTextBox
)
);
m_pPaintDevice
->
DrawText
(
aTextBox
,
GetText
(),
impl_getTextStyle
()
);
m_pPaintDevice
->
DrawText
(
aTextBox
,
GetText
(),
impl_getTextStyle
()
);
aFocusBox
.
Union
(
aTextBox
);
aFocusBox
.
Union
(
aTextBox
);
aFocusBox
.
Left
()
+=
2
;
impl_paintFocusIndicator
(
aFocusBox
);
impl_paintFocusIndicator
(
aFocusBox
);
m_aVisualization
->
DrawOutDev
(
Point
(),
GetOutputSizePixel
(),
Point
(),
GetOutputSizePixel
(),
*
m_pPaintDevice
);
rRenderContext
.
DrawOutDev
(
Point
(),
GetOutputSizePixel
(),
Point
(),
GetOutputSizePixel
(),
*
m_pPaintDevice
);
}
...
...
svtools/source/toolpanel/toolpaneldrawer.hxx
Dosyayı görüntüle @
34f19860
...
...
@@ -24,15 +24,10 @@
#include <vcl/virdev.hxx>
#include <vcl/vclptr.hxx>
namespace
svt
{
class
ToolPanelDrawer
;
//= DrawerVisualization
/** serves a single purpose - let ZoomText read the drawers ...
Strange enough, ZoomText does not read the drawers when they get the focus (in none of the combinations
...
...
@@ -45,32 +40,31 @@ namespace svt
class
DrawerVisualization
:
public
vcl
::
Window
{
public
:
DrawerVisualization
(
ToolPanelDrawer
&
i_rParent
);
DrawerVisualization
(
ToolPanelDrawer
&
i_rParent
);
protected
:
// Window overridables
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
i_rBoundingBox
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
i_rBoundingBox
)
SAL_OVERRIDE
;
private
:
ToolPanelDrawer
&
m_rDrawer
;
ToolPanelDrawer
&
m_rDrawer
;
};
//= ToolPanelDrawer
class
ToolPanelDrawer
:
public
vcl
::
Window
{
public
:
ToolPanelDrawer
(
vcl
::
Window
&
i_rParent
,
const
OUString
&
i_rTitle
);
ToolPanelDrawer
(
vcl
::
Window
&
i_rParent
,
const
OUString
&
i_rTitle
);
virtual
~
ToolPanelDrawer
();
virtual
void
dispose
()
SAL_OVERRIDE
;
long
GetPreferredHeightPixel
()
const
;
void
SetExpanded
(
const
bool
i_bExpanded
);
bool
IsExpanded
()
const
{
return
m_bExpanded
;
}
long
GetPreferredHeightPixel
()
const
;
void
SetExpanded
(
const
bool
i_bExpanded
);
bool
IsExpanded
()
const
{
return
m_bExpanded
;
}
void
Paint
();
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
);
protected
:
// Window overridables
...
...
@@ -97,16 +91,13 @@ namespace svt
using
Window
::
Paint
;
private
:
ScopedVclPtr
<
VirtualDevice
>
m_pPaintDevice
;
VclPtr
<
DrawerVisualization
>
m_aVisualization
;
bool
m_bFocused
;
bool
m_bExpanded
;
ScopedVclPtr
<
VirtualDevice
>
m_pPaintDevice
;
VclPtr
<
DrawerVisualization
>
m_aVisualization
;
bool
m_bFocused
:
1
;
bool
m_bExpanded
:
1
;
};
}
// namespace svt
#endif // INCLUDED_SVTOOLS_SOURCE_TOOLPANEL_TOOLPANELDRAWER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment