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
356f6c5d
Kaydet (Commit)
356f6c5d
authored
Ock 15, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
teach FrameSelector to be resizable
Change-Id: I0fd91d707b89197d57dc6eaf7dcebfdb055d73c6
üst
8a324a3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
frmsel.hxx
svx/inc/svx/frmsel.hxx
+3
-0
frmsel.cxx
svx/source/dialog/frmsel.cxx
+37
-0
frmselimpl.hxx
svx/source/inc/frmselimpl.hxx
+3
-0
No files found.
svx/inc/svx/frmsel.hxx
Dosyayı görüntüle @
356f6c5d
...
@@ -84,6 +84,7 @@ class SVX_DLLPUBLIC FrameSelector : public Control
...
@@ -84,6 +84,7 @@ class SVX_DLLPUBLIC FrameSelector : public Control
{
{
public
:
public
:
explicit
FrameSelector
(
Window
*
pParent
,
const
ResId
&
rResId
);
explicit
FrameSelector
(
Window
*
pParent
,
const
ResId
&
rResId
);
FrameSelector
(
Window
*
pParent
);
virtual
~
FrameSelector
();
virtual
~
FrameSelector
();
/** Initializes the control, enables/disables frame borders according to flags. */
/** Initializes the control, enables/disables frame borders according to flags. */
...
@@ -186,6 +187,8 @@ protected:
...
@@ -186,6 +187,8 @@ protected:
virtual
void
GetFocus
();
virtual
void
GetFocus
();
virtual
void
LoseFocus
();
virtual
void
LoseFocus
();
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
);
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
);
virtual
void
Resize
();
virtual
Size
GetOptimalSize
()
const
;
private
:
private
:
std
::
auto_ptr
<
FrameSelectorImpl
>
mxImpl
;
std
::
auto_ptr
<
FrameSelectorImpl
>
mxImpl
;
...
...
svx/source/dialog/frmsel.cxx
Dosyayı görüntüle @
356f6c5d
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
*/
*/
#include <svx/frmsel.hxx>
#include <svx/frmsel.hxx>
#include <vcl/builder.hxx>
#include <algorithm>
#include <algorithm>
#include <math.h>
#include <math.h>
...
@@ -374,6 +375,13 @@ void FrameSelectorImpl::InitBorderGeometry()
...
@@ -374,6 +375,13 @@ void FrameSelectorImpl::InitBorderGeometry()
/* Width for focus rectangles from center of frame borders. */
/* Width for focus rectangles from center of frame borders. */
mnFocusOffs
=
FRAMESEL_GEOM_WIDTH
/
2
+
1
;
mnFocusOffs
=
FRAMESEL_GEOM_WIDTH
/
2
+
1
;
maLeft
.
ClearFocusArea
();
maVer
.
ClearFocusArea
();
maRight
.
ClearFocusArea
();
maTop
.
ClearFocusArea
();
maHor
.
ClearFocusArea
();
maBottom
.
ClearFocusArea
();
maLeft
.
AddFocusPolygon
(
Rectangle
(
mnLine1
-
mnFocusOffs
,
mnLine1
-
mnFocusOffs
,
mnLine1
+
mnFocusOffs
,
mnLine3
+
mnFocusOffs
)
);
maLeft
.
AddFocusPolygon
(
Rectangle
(
mnLine1
-
mnFocusOffs
,
mnLine1
-
mnFocusOffs
,
mnLine1
+
mnFocusOffs
,
mnLine3
+
mnFocusOffs
)
);
maVer
.
AddFocusPolygon
(
Rectangle
(
mnLine2
-
mnFocusOffs
,
mnLine1
-
mnFocusOffs
,
mnLine2
+
mnFocusOffs
,
mnLine3
+
mnFocusOffs
)
);
maVer
.
AddFocusPolygon
(
Rectangle
(
mnLine2
-
mnFocusOffs
,
mnLine1
-
mnFocusOffs
,
mnLine2
+
mnFocusOffs
,
mnLine3
+
mnFocusOffs
)
);
maRight
.
AddFocusPolygon
(
Rectangle
(
mnLine3
-
mnFocusOffs
,
mnLine1
-
mnFocusOffs
,
mnLine3
+
mnFocusOffs
,
mnLine3
+
mnFocusOffs
)
);
maRight
.
AddFocusPolygon
(
Rectangle
(
mnLine3
-
mnFocusOffs
,
mnLine1
-
mnFocusOffs
,
mnLine3
+
mnFocusOffs
,
mnLine3
+
mnFocusOffs
)
);
...
@@ -477,6 +485,11 @@ void FrameSelectorImpl::InitVirtualDevice()
...
@@ -477,6 +485,11 @@ void FrameSelectorImpl::InitVirtualDevice()
InitColors
();
InitColors
();
InitArrowImageList
();
InitArrowImageList
();
sizeChanged
();
}
void
FrameSelectorImpl
::
sizeChanged
()
{
// initialize geometry
// initialize geometry
InitGlobalGeometry
();
InitGlobalGeometry
();
InitBorderGeometry
();
InitBorderGeometry
();
...
@@ -773,6 +786,19 @@ FrameSelector::FrameSelector( Window* pParent, const ResId& rResId ) :
...
@@ -773,6 +786,19 @@ FrameSelector::FrameSelector( Window* pParent, const ResId& rResId ) :
EnableRTL
(
false
);
// #107808# don't mirror the mouse handling
EnableRTL
(
false
);
// #107808# don't mirror the mouse handling
}
}
FrameSelector
::
FrameSelector
(
Window
*
pParent
)
:
Control
(
pParent
,
WB_BORDER
|
WB_TABSTOP
)
{
// not in c'tor init list (avoid warning about usage of *this)
mxImpl
.
reset
(
new
FrameSelectorImpl
(
*
this
)
);
EnableRTL
(
false
);
// #107808# don't mirror the mouse handling
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeSvxFrameSelector
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
)
{
return
new
FrameSelector
(
pParent
);
}
FrameSelector
::~
FrameSelector
()
FrameSelector
::~
FrameSelector
()
{
{
}
}
...
@@ -1181,6 +1207,17 @@ void FrameSelector::DataChanged( const DataChangedEvent& rDCEvt )
...
@@ -1181,6 +1207,17 @@ void FrameSelector::DataChanged( const DataChangedEvent& rDCEvt )
mxImpl
->
InitVirtualDevice
();
mxImpl
->
InitVirtualDevice
();
}
}
void
FrameSelector
::
Resize
()
{
Control
::
Resize
();
mxImpl
->
sizeChanged
();
}
Size
FrameSelector
::
GetOptimalSize
()
const
{
return
LogicToPixel
(
Size
(
61
,
65
),
MAP_APPFONT
);
}
// ============================================================================
// ============================================================================
template
<
typename
Cont
,
typename
Iter
,
typename
Pred
>
template
<
typename
Cont
,
typename
Iter
,
typename
Pred
>
...
...
svx/source/inc/frmselimpl.hxx
Dosyayı görüntüle @
356f6c5d
...
@@ -163,6 +163,9 @@ struct FrameSelectorImpl : public Resource
...
@@ -163,6 +163,9 @@ struct FrameSelectorImpl : public Resource
void
InitClickAreas
();
void
InitClickAreas
();
/** Draws the entire control into the internal virtual device. */
/** Draws the entire control into the internal virtual device. */
void
InitVirtualDevice
();
void
InitVirtualDevice
();
/** call this to recalculate based on parent size */
void
sizeChanged
();
// frame border access ----------------------------------------------------
// frame border access ----------------------------------------------------
...
...
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