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
595f467e
Kaydet (Commit)
595f467e
authored
Eyl 04, 2012
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
mpre debug, fix more obvious fobars
Change-Id: I88664f7dd09c8d6cdc1c18e87b3cd40b7e3bb246
üst
613f8a31
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
scrollabledialog.cxx
toolkit/source/awt/scrollabledialog.cxx
+20
-14
No files found.
toolkit/source/awt/scrollabledialog.cxx
Dosyayı görüntüle @
595f467e
...
...
@@ -54,13 +54,14 @@ Window* ScrollableDialog::getContentWindow()
void
ScrollableDialog
::
lcl_Scroll
(
long
nX
,
long
nY
)
{
long
nXScroll
=
mnScrollPos
.
Y
()
-
nX
;
long
nYScroll
=
mnScrollPos
.
X
()
-
nY
;
long
nXScroll
=
mnScrollPos
.
X
()
-
nX
;
long
nYScroll
=
mnScrollPos
.
Y
()
-
nY
;
printf
(
"ScrollableDialog::lcl_Scroll %d, %d nXScroll %d, nYScroll %d
\n
"
,
nX
,
nY
,
nXScroll
,
nYScroll
);
mnScrollPos
=
Point
(
nX
,
nY
);
Rectangle
aScrollableArea
(
0
,
0
,
maScrollArea
.
Width
(),
maScrollArea
.
Height
()
);
Window
::
Scroll
(
nXScroll
,
nYScroll
,
aScrollableArea
);
// Manually scroll all children ( except the scrollbars )
for
(
int
index
=
0
;
index
<
GetChildCount
();
++
index
)
{
...
...
@@ -78,9 +79,9 @@ IMPL_LINK( ScrollableDialog, ScrollBarHdl, ScrollBar*, pSB )
{
sal_uInt16
nPos
=
(
sal_uInt16
)
pSB
->
GetThumbPos
();
if
(
pSB
==
&
maVScrollBar
)
Scroll
(
0
,
nPos
);
lcl_Scroll
(
mnScrollPos
.
X
()
,
nPos
);
else
if
(
pSB
==
&
maHScrollBar
)
lcl_Scroll
(
nPos
,
0
);
lcl_Scroll
(
nPos
,
mnScrollPos
.
Y
()
);
#if 0
sal_uInt16 nPos = (sal_uInt16) pSB->GetThumbPos();
Rectangle aScrollableArea( 0, 0, maScrollArea.Width(), maScrollArea.Height() );
...
...
@@ -132,13 +133,13 @@ void ScrollableDialog::SetScrollHeight( long nHeight )
void
ScrollableDialog
::
Paint
(
const
Rectangle
&
rRect
)
{
printf
(
"ScrollableDialog::Paint( %d, %d, %d, %d width %d height %d
\n
"
,
rRect
.
Top
(),
rRect
.
Left
(),
rRect
.
Right
(),
rRect
.
Bottom
(),
GetSizePixel
().
Width
(),
GetSizePixel
().
Height
()
);
//
printf("ScrollableDialog::Paint( %d, %d, %d, %d width %d height %d\n", rRect.Top(), rRect.Left(), rRect.Right(), rRect.Bottom(),GetSizePixel().Width(), GetSizePixel().Height() );
Dialog
::
Paint
(
rRect
);
}
void
ScrollableDialog
::
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
)
{
printf
(
"ScrollableDialog::Draw( ( %d, %d ) h %d, w %d
\n
"
,
rPos
.
X
(),
rPos
.
Y
(),
rSize
.
Height
(),
rSize
.
Width
()
);
//
printf("ScrollableDialog::Draw( ( %d, %d ) h %d, w %d \n", rPos.X(), rPos.Y(), rSize.Height(), rSize.Width() );
Dialog
::
Draw
(
pDev
,
rPos
,
rSize
,
nFlags
);
}
...
...
@@ -162,23 +163,24 @@ void ScrollableDialog::Resize()
nMaxX
=
nX
;
if
(
nY
>
nMaxY
)
nMaxY
=
nY
;
printf
(
"%s child[%d] pos (%d,%d) height %d, width %d
\n
"
,
rtl
::
OUStringToOString
(
pChild
->
GetText
(),
RTL_TEXTENCODING_UTF8
).
getStr
(),
index
,
aPos
.
X
(),
aPos
.
Y
(),
aSize
.
Height
(),
aSize
.
Width
()
);
}
}
#if
0
#if
1
// assume for the moment that we have both hori & vert scroll bars
Size
aContentsSize
(
aOutSz
);
if
(
mbHasVertBar
)
{
aContentsSize
.
Width
()
-=
mnScrWidth
;
nMaxX += nScrWidth;
nMaxX
+=
m
nScrWidth
;
}
if
(
mbHasHoriBar
)
{
aContentsSize
.
Height
()
-=
mnScrWidth
;
nMaxY
+=
mnScrWidth
;
}
ma
Contents.SetSizePixel( aContentsSize )
;
ma
ScrollArea
=
aContentsSize
;
#endif
Point
aVPos
(
aOutSz
.
Width
()
-
mnScrWidth
,
0
);
...
...
@@ -186,12 +188,16 @@ void ScrollableDialog::Resize()
maVScrollBar
.
SetPosSizePixel
(
aVPos
,
Size
(
mnScrWidth
,
GetSizePixel
().
Height
()
-
mnScrWidth
)
);
maHScrollBar
.
SetPosSizePixel
(
aHPos
,
Size
(
GetSizePixel
().
Width
()
-
mnScrWidth
,
mnScrWidth
)
);
maHScrollBar
.
SetRangeMax
(
maScrollArea
.
Width
()
);
printf
(
"nMaxX is %d nMaxY is %d, scrollarea height %d, width %d
\n
"
,
nMaxX
,
nMaxY
,
maScrollArea
.
Height
(),
maScrollArea
.
Width
()
);
printf
(
"Width %d Height %d outsize width %d height %d
\n
"
,
GetSizePixel
().
Width
(),
GetSizePixel
().
Height
(),
aOutSz
.
Width
(),
aOutSz
.
Height
()
);
maHScrollBar
.
SetRangeMax
(
nMaxX
);
maHScrollBar
.
SetVisibleSize
(
GetSizePixel
().
Width
()
);
maHScrollBar
.
SetPageSize
(
maScrollArea
.
Width
()
);
maVScrollBar
.
SetRangeMax
(
maScrollArea
.
Height
()
);
// maHScrollBar.SetPageSize( maScrollArea.Height() );
maVScrollBar
.
SetRangeMax
(
nMaxY
);
maVScrollBar
.
SetVisibleSize
(
GetSizePixel
().
Height
()
);
maVScrollBar
.
SetPageSize
(
maScrollArea
.
Height
()
);
// maVScrollBar.SetPageSize( maScrollArea.Width
() );
}
}
// toolkit
...
...
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