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
61eb53d3
Kaydet (Commit)
61eb53d3
authored
May 08, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert FRAME_DRAW constants to scoped enum
Change-Id: I98e52aa56ec063ecc8f3d10baef65eb293c726bf
üst
0ac80267
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
107 additions
and
91 deletions
+107
-91
valueset.hxx
include/svtools/valueset.hxx
+2
-1
decoview.hxx
include/vcl/decoview.hxx
+24
-13
headerfooterdlg.cxx
sd/source/ui/dlg/headerfooterdlg.cxx
+1
-1
dockwin.cxx
sfx2/source/dialog/dockwin.cxx
+1
-1
view.cxx
starmath/source/view.cxx
+2
-2
valueset.cxx
svtools/source/control/valueset.cxx
+3
-3
salnativewidgets.cxx
vcl/osx/salnativewidgets.cxx
+3
-3
button.cxx
vcl/source/control/button.cxx
+5
-5
ctrl.cxx
vcl/source/control/ctrl.cxx
+1
-1
fixed.cxx
vcl/source/control/fixed.cxx
+1
-1
vclmedit.cxx
vcl/source/edit/vclmedit.cxx
+1
-1
brdwin.cxx
vcl/source/window/brdwin.cxx
+18
-16
decoview.cxx
vcl/source/window/decoview.cxx
+30
-28
menu.cxx
vcl/source/window/menu.cxx
+1
-1
printdlg.cxx
vcl/source/window/printdlg.cxx
+2
-2
splitwin.cxx
vcl/source/window/splitwin.cxx
+1
-1
status.cxx
vcl/source/window/status.cxx
+5
-5
salnativewidgets-gtk.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+5
-5
KDESalGraphics.cxx
vcl/unx/kde4/KDESalGraphics.cxx
+1
-1
No files found.
include/svtools/valueset.hxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -39,6 +39,7 @@ struct ValueSetItem;
class
ValueSetAcc
;
class
ValueItemAcc
;
enum
class
DrawFrameStyle
;
/*************************************************************************
...
...
@@ -219,7 +220,7 @@ private:
sal_uInt16
mnUserVisLines
;
sal_uInt16
mnFirstLine
;
sal_uInt16
mnSpacing
;
sal_uInt16
mnFrameStyle
;
DrawFrameStyle
mnFrameStyle
;
Color
maColor
;
Link
<>
maDoubleClickHdl
;
Link
<>
maSelectHdl
;
...
...
include/vcl/decoview.hxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -43,18 +43,29 @@ namespace o3tl
}
// Flags for DrawFrame()
#define FRAME_DRAW_IN ((sal_uInt16)0x0001)
#define FRAME_DRAW_OUT ((sal_uInt16)0x0002)
#define FRAME_DRAW_GROUP ((sal_uInt16)0x0003)
#define FRAME_DRAW_DOUBLEIN ((sal_uInt16)0x0004)
#define FRAME_DRAW_DOUBLEOUT ((sal_uInt16)0x0005)
#define FRAME_DRAW_NWF ((sal_uInt16)0x0006)
#define FRAME_DRAW_MENU ((sal_uInt16)0x0010)
#define FRAME_DRAW_WINDOWBORDER ((sal_uInt16)0x0020)
#define FRAME_DRAW_BORDERWINDOWBORDER ((sal_uInt16)0x0040)
#define FRAME_DRAW_MONO ((sal_uInt16)0x1000)
#define FRAME_DRAW_NODRAW ((sal_uInt16)0x8000)
#define FRAME_DRAW_STYLE ((sal_uInt16)0x000F)
enum
class
DrawFrameStyle
{
NONE
=
0x0000
,
In
=
0x0001
,
Out
=
0x0002
,
Group
=
0x0003
,
DoubleIn
=
0x0004
,
DoubleOut
=
0x0005
,
NWF
=
0x0006
,
};
enum
class
DrawFrameFlags
{
NONE
=
0x0000
,
Menu
=
0x0010
,
WindowBorder
=
0x0020
,
BorderWindowBorder
=
0x0040
,
Mono
=
0x1000
,
NoDraw
=
0x8000
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
DrawFrameFlags
>
:
is_typed_flags
<
DrawFrameFlags
,
0x9070
>
{};
}
// Flags for DrawHighlightFrame()
#define FRAME_HIGHLIGHT_IN ((sal_uInt16)0x0001)
...
...
@@ -92,7 +103,7 @@ public:
const
Color
&
rRightBottomColor
);
void
DrawHighlightFrame
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
=
FRAME_HIGHLIGHT_OUT
);
Rectangle
DrawFrame
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
=
FRAME_DRAW_OUT
);
Rectangle
DrawFrame
(
const
Rectangle
&
rRect
,
DrawFrameStyle
nStyle
=
DrawFrameStyle
::
Out
,
DrawFrameFlags
nFlags
=
DrawFrameFlags
::
NONE
);
Rectangle
DrawButton
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
);
void
DrawSeparator
(
const
Point
&
rStart
,
const
Point
&
rStop
,
bool
bVertical
=
true
);
void
DrawHandle
(
const
Rectangle
&
rRectangle
,
bool
bVertical
=
true
);
...
...
sd/source/ui/dlg/headerfooterdlg.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -806,7 +806,7 @@ void PresLayoutPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rec
// draw decoration frame
DecorationView
aDecoView
(
this
);
maOutRect
=
aDecoView
.
DrawFrame
(
maOutRect
,
FRAME_HIGHLIGHT_IN
);
maOutRect
=
aDecoView
.
DrawFrame
(
maOutRect
,
DrawFrameStyle
::
In
);
// draw page background
SetFillColor
(
Color
(
COL_WHITE
)
);
...
...
sfx2/source/dialog/dockwin.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -1791,7 +1791,7 @@ void SfxDockingWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Recta
}
DecorationView
aView
(
this
);
aView
.
DrawFrame
(
aRect
,
FRAME_DRAW_OUT
);
aView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
Out
);
}
...
...
starmath/source/view.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -753,7 +753,7 @@ void SmCmdBoxWindow::Resize()
aRect
.
Bottom
()
-=
CMD_BOX_PADDING
;
DecorationView
aView
(
this
);
aRect
=
aView
.
DrawFrame
(
aRect
,
FRAME_DRAW_IN
|
FRAME_DRAW_NODRAW
);
aRect
=
aView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
In
,
DrawFrameFlags
::
NoDraw
);
aEdit
->
SetPosSizePixel
(
aRect
.
TopLeft
(),
aRect
.
GetSize
());
SfxDockingWindow
::
Resize
();
...
...
@@ -769,7 +769,7 @@ void SmCmdBoxWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectang
aRect
.
Bottom
()
-=
CMD_BOX_PADDING
;
DecorationView
aView
(
this
);
aView
.
DrawFrame
(
aRect
,
FRAME_DRAW_IN
);
aView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
In
);
}
Size
SmCmdBoxWindow
::
CalcDockingSize
(
SfxChildAlignment
eAlign
)
...
...
svtools/source/control/valueset.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -75,7 +75,7 @@ void ValueSet::ImplInit()
mnUserCols
=
0
;
mnUserVisLines
=
0
;
mnSpacing
=
0
;
mnFrameStyle
=
0
;
mnFrameStyle
=
DrawFrameStyle
::
NONE
;
mbFormat
=
true
;
mbHighlight
=
false
;
mbSelection
=
false
;
...
...
@@ -524,9 +524,9 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
// determine Frame-Style
if
(
nStyle
&
WB_DOUBLEBORDER
)
mnFrameStyle
=
FRAME_DRAW_DOUBLEIN
;
mnFrameStyle
=
DrawFrameStyle
::
DoubleIn
;
else
mnFrameStyle
=
FRAME_DRAW_IN
;
mnFrameStyle
=
DrawFrameStyle
::
In
;
// determine selected color and width
// if necessary change the colors, to make the selection
...
...
vcl/osx/salnativewidgets.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -1015,7 +1015,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
{
sal_uInt16
nStyle
=
aValue
.
getNumericVal
();
if
(
nPart
==
PART_BORDER
)
{
if
(
!
(
nStyle
&
FRAME_DRAW_MENU
)
&&
!
(
nStyle
&
FRAME_DRAW_WINDOWBORDER
)
)
if
(
!
(
nStyle
&
DrawFrameFlags
::
Menu
)
&&
!
(
nStyle
&
DrawFrameFlags
::
WindowBorder
)
)
{
// #i84756# strange effects start to happen when HIThemeDrawFrame
// meets the border of the window. These can be avoided by clipping
...
...
@@ -1321,10 +1321,10 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
sal_uInt16
nStyle
=
aValue
.
getNumericVal
();
if
(
(
nPart
==
PART_BORDER
)
&&
!
(
nStyle
&
(
FRAME_DRAW_MENU
|
FRAME_DRAW_WINDOWBORDER
|
FRAME_DRAW_BORDERWINDOWBORDER
)
)
)
!
(
nStyle
&
(
DrawFrameFlags
::
Menu
|
DrawFrameFlags
::
WindowBorder
|
DrawFrameFlags
::
BorderWindowBorder
)
)
)
{
Rectangle
aRect
(
aCtrlBoundRect
);
if
(
nStyle
&
FRAME_DRAW_DOUBLEIN
)
if
(
nStyle
&
DrawFrameStyle
::
DoubleIn
)
{
aRect
.
Left
()
+=
1
;
aRect
.
Top
()
+=
1
;
...
...
vcl/source/control/button.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -1910,7 +1910,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
Rectangle
aImageRect
=
maStateRect
;
Size
aImageSize
=
maImage
.
GetSizePixel
();
bool
bEnabled
=
IsEnabled
();
sal_uInt16
nButtonStyle
=
FRAME_DRAW_DOUBLEIN
;
DrawFrameStyle
nButtonStyle
=
DrawFrameStyle
::
DoubleIn
;
aImageSize
.
Width
()
=
CalcZoom
(
aImageSize
.
Width
());
aImageSize
.
Height
()
=
CalcZoom
(
aImageSize
.
Height
());
...
...
@@ -1925,9 +1925,9 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
rRenderContext
.
DrawRect
(
aImageRect
);
// display image
nButton
Style
=
0
;
sal_uInt16
nImage
Style
=
0
;
if
(
!
bEnabled
)
n
Button
Style
|=
IMAGE_DRAW_DISABLE
;
n
Image
Style
|=
IMAGE_DRAW_DISABLE
;
Image
*
pImage
=
&
maImage
;
...
...
@@ -1935,9 +1935,9 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
aImagePos
.
X
()
+=
(
aImageRect
.
GetWidth
()
-
aImageSize
.
Width
())
/
2
;
aImagePos
.
Y
()
+=
(
aImageRect
.
GetHeight
()
-
aImageSize
.
Height
())
/
2
;
if
(
IsZoom
())
rRenderContext
.
DrawImage
(
aImagePos
,
aImageSize
,
*
pImage
,
n
Button
Style
);
rRenderContext
.
DrawImage
(
aImagePos
,
aImageSize
,
*
pImage
,
n
Image
Style
);
else
rRenderContext
.
DrawImage
(
aImagePos
,
*
pImage
,
n
Button
Style
);
rRenderContext
.
DrawImage
(
aImagePos
,
*
pImage
,
n
Image
Style
);
aImageRect
.
Left
()
++
;
aImageRect
.
Top
()
++
;
...
...
vcl/source/control/ctrl.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -377,7 +377,7 @@ void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect )
pDev
->
OutputDevice
::
SetSettings
(
aNewSettings
);
DecorationView
aDecoView
(
pDev
);
rRect
=
aDecoView
.
DrawFrame
(
rRect
,
FRAME_DRAW_WINDOWBORDER
);
rRect
=
aDecoView
.
DrawFrame
(
rRect
,
DrawFrameStyle
::
Out
,
DrawFrameFlags
::
WindowBorder
);
pDev
->
OutputDevice
::
SetSettings
(
aOriginalSettings
);
}
...
...
vcl/source/control/fixed.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -790,7 +790,7 @@ void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
if
(
!
(
nFlags
&
WINDOW_DRAW_NOBORDER
)
&&
(
GetStyle
()
&
WB_BORDER
)
)
{
DecorationView
aDecoView
(
pDev
);
aRect
=
aDecoView
.
DrawFrame
(
aRect
,
FRAME_DRAW_DOUBLEIN
);
aRect
=
aDecoView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
DoubleIn
);
}
pDev
->
IntersectClipRegion
(
aRect
);
ImplDraw
(
pDev
,
nFlags
,
aRect
.
TopLeft
(),
aRect
.
GetSize
()
);
...
...
vcl/source/edit/vclmedit.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -1338,7 +1338,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
if
(
bBorder
)
{
DecorationView
aDecoView
(
pDev
);
aRect
=
aDecoView
.
DrawFrame
(
aRect
,
FRAME_DRAW_DOUBLEIN
);
aRect
=
aDecoView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
DoubleIn
);
}
if
(
bBackground
)
{
...
...
vcl/source/window/brdwin.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -1133,20 +1133,21 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
if
(
!
mbNWFBorder
)
{
sal_uInt16
nStyle
=
FRAME_DRAW_NODRAW
;
DrawFrameStyle
nStyle
=
DrawFrameStyle
::
NONE
;
DrawFrameFlags
nFlags
=
DrawFrameFlags
::
NoDraw
;
// move border outside if border was converted or if the BorderWindow is a frame window,
if
(
mpBorderWindow
->
mbSmallOutBorder
)
nStyle
|=
FRAME_DRAW_DOUBLEOUT
;
nStyle
=
DrawFrameStyle
::
DoubleOut
;
else
if
(
nBorderStyle
&
WindowBorderStyle
::
NWF
)
nStyle
|=
FRAME_DRAW_
NWF
;
nStyle
=
DrawFrameStyle
::
NWF
;
else
nStyle
|=
FRAME_DRAW_DOUBLEIN
;
nStyle
=
DrawFrameStyle
::
DoubleIn
;
if
(
nBorderStyle
&
WindowBorderStyle
::
MONO
)
n
Style
|=
FRAME_DRAW_MONO
;
n
Flags
|=
DrawFrameFlags
::
Mono
;
DecorationView
aDecoView
(
mpOutDev
);
Rectangle
aRect
(
0
,
0
,
10
,
10
);
Rectangle
aCalcRect
=
aDecoView
.
DrawFrame
(
aRect
,
nStyle
);
Rectangle
aCalcRect
=
aDecoView
.
DrawFrame
(
aRect
,
nStyle
,
nFlags
);
mnLeftBorder
=
aCalcRect
.
Left
();
mnTopBorder
=
aCalcRect
.
Top
();
mnRightBorder
=
aRect
.
Right
()
-
aCalcRect
.
Right
();
...
...
@@ -1321,26 +1322,27 @@ void ImplSmallBorderWindowView::DrawWindow(sal_uInt16 nDrawFlags, OutputDevice*,
if
(
nDrawFlags
&
BORDERWINDOW_DRAW_FRAME
)
{
sal_uInt16
nStyle
=
0
;
DrawFrameStyle
nStyle
=
DrawFrameStyle
::
NONE
;
DrawFrameFlags
nFlags
=
DrawFrameFlags
::
NONE
;
// move border outside if border was converted or if the border window is a frame window,
if
(
mpBorderWindow
->
mbSmallOutBorder
)
nStyle
|=
FRAME_DRAW_DOUBLEOUT
;
nStyle
=
DrawFrameStyle
::
DoubleOut
;
else
if
(
nBorderStyle
&
WindowBorderStyle
::
NWF
)
nStyle
|=
FRAME_DRAW_
NWF
;
nStyle
=
DrawFrameStyle
::
NWF
;
else
nStyle
|=
FRAME_DRAW_DOUBLEIN
;
nStyle
=
DrawFrameStyle
::
DoubleIn
;
if
(
nBorderStyle
&
WindowBorderStyle
::
MONO
)
n
Style
|=
FRAME_DRAW_MONO
;
n
Flags
|=
DrawFrameFlags
::
Mono
;
if
(
nBorderStyle
&
WindowBorderStyle
::
MENU
)
n
Style
|=
FRAME_DRAW_MENU
;
n
Flags
|=
DrawFrameFlags
::
Menu
;
// tell DrawFrame that we're drawing a window border of a frame window to avoid round corners
if
(
pWin
&&
pWin
==
pWin
->
ImplGetFrameWindow
())
n
Style
|=
FRAME_DRAW_WINDOWBORDER
;
n
Flags
|=
DrawFrameFlags
::
WindowBorder
;
DecorationView
aDecoView
(
mpOutDev
);
Point
aTmpPoint
;
Rectangle
aInRect
(
aTmpPoint
,
Size
(
mnWidth
,
mnHeight
));
aDecoView
.
DrawFrame
(
aInRect
,
nStyle
);
aDecoView
.
DrawFrame
(
aInRect
,
nStyle
,
nFlags
);
}
}
...
...
@@ -1402,7 +1404,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
const
StyleSettings
&
rStyleSettings
=
pDev
->
GetSettings
().
GetStyleSettings
();
DecorationView
aDecoView
(
pDev
);
Rectangle
aRect
(
0
,
0
,
10
,
10
);
Rectangle
aCalcRect
=
aDecoView
.
DrawFrame
(
aRect
,
FRAME_DRAW_DOUBLEOUT
|
FRAME_DRAW_NODRAW
);
Rectangle
aCalcRect
=
aDecoView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
DoubleOut
,
DrawFrameFlags
::
NoDraw
);
pData
->
mpOutDev
=
pDev
;
pData
->
mnWidth
=
nWidth
;
...
...
@@ -1605,7 +1607,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
pDev
->
SetClipRegion
(
oldClipRgn
);
}
else
aInRect
=
aDecoView
.
DrawFrame
(
aInRect
,
FRAME_DRAW_DOUBLEOUT
|
FRAME_DRAW_NODRAW
);
aInRect
=
aDecoView
.
DrawFrame
(
aInRect
,
DrawFrameStyle
::
DoubleOut
,
DrawFrameFlags
::
NoDraw
);
// Draw Border
pDev
->
SetLineColor
();
...
...
vcl/source/window/decoview.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -621,11 +621,11 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
}
void
ImplDrawFrame
(
OutputDevice
*
const
pDev
,
Rectangle
&
rRect
,
const
StyleSettings
&
rStyleSettings
,
sal_uInt16
nStyle
)
const
StyleSettings
&
rStyleSettings
,
DrawFrameStyle
nStyle
,
DrawFrameFlags
nFlags
)
{
vcl
::
Window
*
const
pWin
=
(
pDev
->
GetOutDevType
()
==
OUTDEV_WINDOW
)
?
static_cast
<
vcl
::
Window
*>
(
pDev
)
:
NULL
;
const
bool
bMenuStyle
=
nStyle
&
FRAME_DRAW_MENU
;
const
bool
bMenuStyle
(
nFlags
&
DrawFrameFlags
::
Menu
)
;
// UseFlatBorders disables 3D style for all frames except menus
// menus may use different border colors (eg on XP)
...
...
@@ -643,19 +643,19 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
bFlatBorders
=
false
;
}
const
bool
bNoDraw
=
nStyle
&
FRAME_DRAW_NODRAW
;
const
bool
bNoDraw
(
nFlags
&
DrawFrameFlags
::
NoDraw
)
;
if
(
(
rStyleSettings
.
GetOptions
()
&
STYLE_OPTION_MONO
)
||
(
pDev
->
GetOutDevType
()
==
OUTDEV_PRINTER
)
||
bFlatBorders
)
n
Style
|=
FRAME_DRAW_MONO
;
n
Flags
|=
DrawFrameFlags
::
Mono
;
if
(
(
nStyle
&
FRAME_DRAW_STYLE
)
!=
FRAME_DRAW_
NWF
&&
if
(
nStyle
!=
DrawFrameStyle
::
NWF
&&
pWin
&&
pWin
->
IsNativeControlSupported
(
CTRL_FRAME
,
PART_BORDER
)
)
{
ImplControlValue
aControlValue
(
nStyle
|
(
pWin
->
GetType
()
==
WINDOW_BORDERWINDOW
?
FRAME_DRAW_BORDERWINDOWBORDER
:
0
)
);
ImplControlValue
aControlValue
(
static_cast
<
long
>
(
nStyle
)
|
static_cast
<
long
>
(
pWin
->
GetType
()
==
WINDOW_BORDERWINDOW
?
DrawFrameFlags
::
BorderWindowBorder
:
DrawFrameFlags
::
NONE
)
);
Rectangle
aBound
,
aContent
;
Rectangle
aNatRgn
(
rRect
);
if
(
pWin
->
GetNativeControlRegion
(
CTRL_FRAME
,
PART_BORDER
,
...
...
@@ -673,10 +673,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
}
}
if
(
n
Style
&
FRAME_DRAW_MONO
)
if
(
n
Flags
&
DrawFrameFlags
::
Mono
)
{
// no round corners for window frame borders
const
bool
bRound
=
bFlatBorders
&&
!
(
n
Style
&
FRAME_DRAW_WINDOWBORDER
);
const
bool
bRound
=
bFlatBorders
&&
!
(
n
Flags
&
DrawFrameFlags
::
WindowBorder
);
if
(
bNoDraw
)
{
...
...
@@ -704,39 +704,40 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
{
if
(
bNoDraw
)
{
switch
(
nStyle
&
FRAME_DRAW_STYLE
)
switch
(
nStyle
)
{
case
FRAME_DRAW_IN
:
case
FRAME_DRAW_OUT
:
case
DrawFrameStyle
:
:
In
:
case
DrawFrameStyle
:
:
Out
:
++
rRect
.
Left
();
++
rRect
.
Top
();
--
rRect
.
Right
();
--
rRect
.
Bottom
();
break
;
case
FRAME_DRAW_GROUP
:
case
FRAME_DRAW_DOUBLEIN
:
case
FRAME_DRAW_DOUBLEOUT
:
case
DrawFrameStyle
:
:
Group
:
case
DrawFrameStyle
:
:
DoubleIn
:
case
DrawFrameStyle
:
:
DoubleOut
:
rRect
.
Left
()
+=
2
;
rRect
.
Top
()
+=
2
;
rRect
.
Right
()
-=
2
;
rRect
.
Bottom
()
-=
2
;
break
;
case
FRAME_DRAW_
NWF
:
case
DrawFrameStyle
:
:
NWF
:
// enough space for the native rendering
rRect
.
Left
()
+=
4
;
rRect
.
Top
()
+=
4
;
rRect
.
Right
()
-=
4
;
rRect
.
Bottom
()
-=
4
;
break
;
default
:
break
;
}
}
else
{
switch
(
nStyle
&
FRAME_DRAW_STYLE
)
switch
(
nStyle
)
{
case
FRAME_DRAW_GROUP
:
case
DrawFrameStyle
:
:
Group
:
pDev
->
SetFillColor
();
pDev
->
SetLineColor
(
rStyleSettings
.
GetLightColor
()
);
pDev
->
DrawRect
(
Rectangle
(
rRect
.
Left
()
+
1
,
rRect
.
Top
()
+
1
,
...
...
@@ -752,19 +753,19 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
rRect
.
Bottom
()
-=
2
;
break
;
case
FRAME_DRAW_IN
:
case
DrawFrameStyle
:
:
In
:
ImplDraw2ColorFrame
(
pDev
,
rRect
,
rStyleSettings
.
GetShadowColor
(),
rStyleSettings
.
GetLightColor
()
);
break
;
case
FRAME_DRAW_OUT
:
case
DrawFrameStyle
:
:
Out
:
ImplDraw2ColorFrame
(
pDev
,
rRect
,
rStyleSettings
.
GetLightColor
(),
rStyleSettings
.
GetShadowColor
()
);
break
;
case
FRAME_DRAW_DOUBLEIN
:
case
DrawFrameStyle
:
:
DoubleIn
:
if
(
bFlatBorders
)
{
// no 3d effect
...
...
@@ -786,7 +787,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
}
break
;
case
FRAME_DRAW_DOUBLEOUT
:
case
DrawFrameStyle
:
:
DoubleOut
:
if
(
bMenuStyle
)
{
ImplDraw2ColorFrame
(
pDev
,
rRect
,
...
...
@@ -812,13 +813,14 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
}
break
;
case
FRAME_DRAW_
NWF
:
case
DrawFrameStyle
:
:
NWF
:
// no rendering, just enough space for the native rendering
rRect
.
Left
()
+=
4
;
rRect
.
Top
()
+=
4
;
rRect
.
Right
()
-=
4
;
rRect
.
Bottom
()
-=
4
;
break
;
default
:
break
;
}
}
}
...
...
@@ -934,7 +936,7 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
DrawFrame
(
rRect
,
aLightColor
,
aShadowColor
);
}
Rectangle
DecorationView
::
DrawFrame
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
)
Rectangle
DecorationView
::
DrawFrame
(
const
Rectangle
&
rRect
,
DrawFrameStyle
nStyle
,
DrawFrameFlags
nFlags
)
{
Rectangle
aRect
=
rRect
;
bool
bOldMap
=
mpOutDev
->
IsMapModeEnabled
();
...
...
@@ -946,13 +948,13 @@ Rectangle DecorationView::DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle )
if
(
!
rRect
.
IsEmpty
()
)
{
if
(
n
Style
&
FRAME_DRAW_NODRAW
)
ImplDrawFrame
(
mpOutDev
,
aRect
,
mpOutDev
->
GetSettings
().
GetStyleSettings
(),
nStyle
);
if
(
n
Flags
&
DrawFrameFlags
::
NoDraw
)
ImplDrawFrame
(
mpOutDev
,
aRect
,
mpOutDev
->
GetSettings
().
GetStyleSettings
(),
nStyle
,
nFlags
);
else
{
Color
maOldLineColor
=
mpOutDev
->
GetLineColor
();
Color
maOldFillColor
=
mpOutDev
->
GetFillColor
();
ImplDrawFrame
(
mpOutDev
,
aRect
,
mpOutDev
->
GetSettings
().
GetStyleSettings
(),
nStyle
);
ImplDrawFrame
(
mpOutDev
,
aRect
,
mpOutDev
->
GetSettings
().
GetStyleSettings
(),
nStyle
,
nFlags
);
mpOutDev
->
SetLineColor
(
maOldLineColor
);
mpOutDev
->
SetFillColor
(
maOldFillColor
);
}
...
...
vcl/source/window/menu.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -2064,7 +2064,7 @@ void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuI
Point
aTmpPos2
(
aPos
);
aTmpPos2
.
X
()
=
aOutSz
.
Width
()
-
nFontHeight
-
nFontHeight
/
4
;
aDecoView
.
DrawFrame
(
Rectangle
(
aTmpPos2
,
Size
(
nFontHeight
+
nFontHeight
/
4
,
pData
->
aSz
.
Height
()
)
),
FRAME_DRAW_GROUP
);
Rectangle
(
aTmpPos2
,
Size
(
nFontHeight
+
nFontHeight
/
4
,
pData
->
aSz
.
Height
()
)
),
DrawFrameStyle
::
Group
);
}
aDecoView
.
DrawSymbol
(
Rectangle
(
aTmpPos
,
Size
(
nFontHeight
/
2
,
nFontHeight
/
2
)
),
...
...
vcl/source/window/printdlg.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -192,7 +192,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
Rectangle
aFrameRect
(
aOffset
+
Point
(
-
1
,
-
1
),
Size
(
maPreviewSize
.
Width
()
+
2
,
maPreviewSize
.
Height
()
+
2
));
DecorationView
aDecorationView
(
&
rRenderContext
);
aDecorationView
.
DrawFrame
(
aFrameRect
,
FRAME_DRAW_GROUP
);
aDecorationView
.
DrawFrame
(
aFrameRect
,
DrawFrameStyle
::
Group
);
}
void
PrintDialog
::
PrintPreviewWindow
::
Command
(
const
CommandEvent
&
rEvt
)
...
...
@@ -377,7 +377,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
nY
*
aSubSize
.
Height
()
+
nDeltaY
),
aPageText
);
}
DecorationView
aDecorationView
(
&
rRenderContext
);
aDecorationView
.
DrawFrame
(
Rectangle
(
Point
(
0
,
0
),
aOutSize
),
FRAME_DRAW_GROUP
);
aDecorationView
.
DrawFrame
(
Rectangle
(
Point
(
0
,
0
),
aOutSize
),
DrawFrameStyle
::
Group
);
}
PrintDialog
::
NUpTabPage
::
NUpTabPage
(
VclBuilder
*
pUIBuilder
)
...
...
vcl/source/window/splitwin.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -161,7 +161,7 @@ void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext)
DecorationView
aDecoView
(
&
rRenderContext
);
Point
aTmpPoint
;
Rectangle
aRect
(
aTmpPoint
,
Size
(
nDX
,
nDY
));
aDecoView
.
DrawFrame
(
aRect
,
FRAME_DRAW_DOUBLEIN
);
aDecoView
.
DrawFrame
(
aRect
,
DrawFrameStyle
::
DoubleIn
);
}
else
{
...
...
vcl/source/window/status.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -444,12 +444,12 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
{
if
(
!
(
pItem
->
mnBits
&
SIB_FLAT
))
{
sal_uInt16
nStyle
;
DrawFrameStyle
nStyle
;
if
(
pItem
->
mnBits
&
SIB_IN
)
nStyle
=
FRAME_DRAW_IN
;
nStyle
=
DrawFrameStyle
::
In
;
else
nStyle
=
FRAME_DRAW_OUT
;
nStyle
=
DrawFrameStyle
::
Out
;
DecorationView
aDecoView
(
&
rRenderContext
);
aDecoView
.
DrawFrame
(
aRect
,
nStyle
);
...
...
@@ -598,7 +598,7 @@ void StatusBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, bool bPaint
if
(
!
bNative
)
{
DecorationView
aDecoView
(
&
rRenderContext
);
aDecoView
.
DrawFrame
(
maPrgsFrameRect
,
FRAME_DRAW_IN
);
aDecoView
.
DrawFrame
(
maPrgsFrameRect
,
DrawFrameStyle
::
In
);
}
}
...
...
@@ -1463,7 +1463,7 @@ Size StatusBar::CalcWindowSizePixel() const
if
(
mpImplData
->
mbDrawItemFrames
&&
IsNativeControlSupported
(
CTRL_FRAME
,
PART_BORDER
)
)
{
ImplControlValue
aControlValue
(
FRAME_DRAW_NODRAW
);
ImplControlValue
aControlValue
(
static_cast
<
long
>
(
DrawFrameFlags
::
NoDraw
)
);
Rectangle
aBound
,
aContent
;
Rectangle
aNatRgn
(
Point
(
0
,
0
),
Size
(
150
,
50
)
);
if
(
GetNativeControlRegion
(
CTRL_FRAME
,
PART_BORDER
,
...
...
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -1317,13 +1317,13 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
{
int
frameWidth
=
getFrameWidth
(
gWidgetData
[
m_nXScreen
].
gFrame
);
rNativeBoundingRegion
=
rControlRegion
;
sal_uInt16
nStyle
=
aValue
.
getNumericVal
(
);
DrawFrameFlags
nStyle
=
static_cast
<
DrawFrameFlags
>
(
aValue
.
getNumericVal
()
&
0xfff0
);
int
x1
=
rControlRegion
.
Left
();
int
y1
=
rControlRegion
.
Top
();
int
x2
=
rControlRegion
.
Right
();
int
y2
=
rControlRegion
.
Bottom
();
if
(
nStyle
&
FRAME_DRAW_NODRAW
)
if
(
nStyle
&
DrawFrameFlags
::
NoDraw
)
{
rNativeContentRegion
=
Rectangle
(
x1
+
frameWidth
,
y1
+
frameWidth
,
...
...
@@ -1494,10 +1494,10 @@ bool GtkSalGraphics::NWPaintGTKFrame(
GdkRectangle
clipRect
;
int
frameWidth
=
getFrameWidth
(
gWidgetData
[
m_nXScreen
].
gFrame
);
GtkShadowType
shadowType
=
GTK_SHADOW_IN
;
sal_uInt16
nStyle
=
aValue
.
getNumericVal
(
);
if
(
nStyle
&
FRAME_DRAW_IN
)
DrawFrameStyle
nStyle
=
static_cast
<
DrawFrameStyle
>
(
aValue
.
getNumericVal
()
&
0x0f
);
if
(
nStyle
==
DrawFrameStyle
::
In
)
shadowType
=
GTK_SHADOW_OUT
;
if
(
nStyle
&
FRAME_DRAW_OUT
)
if
(
nStyle
==
DrawFrameStyle
::
Out
)
shadowType
=
GTK_SHADOW_IN
;
for
(
clipList
::
const_iterator
it
=
rClipList
.
begin
();
it
!=
rClipList
.
end
();
++
it
)
...
...
vcl/unx/kde4/KDESalGraphics.cxx
Dosyayı görüntüle @
61eb53d3
...
...
@@ -840,7 +840,7 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
{
int
nFrameWidth
=
static_cast
<
KDESalInstance
*
>
(
GetSalData
()
->
m_pInstance
)
->
getFrameWidth
();
sal_uInt16
nStyle
=
val
.
getNumericVal
();
if
(
nStyle
&
FRAME_DRAW_NODRAW
)
if
(
nStyle
&
DrawFrameFlags
::
NoDraw
)
{
// in this case the question is: how thick would a frame be
// see brdwin.cxx, decoview.cxx
...
...
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