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
9975c632
Kaydet (Commit)
9975c632
authored
Ock 22, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rework accessibility to be layout aware
Change-Id: I9f8ddfc5007dad6f090abae7e3e0a2d637da0b37
üst
2a3a15fd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
113 additions
and
19 deletions
+113
-19
fixed.hxx
vcl/inc/vcl/fixed.hxx
+6
-0
layout.hxx
vcl/inc/vcl/layout.hxx
+7
-0
window.hxx
vcl/inc/vcl/window.hxx
+17
-0
window.h
vcl/inc/window.h
+2
-0
fixed.cxx
vcl/source/control/fixed.cxx
+31
-0
dlgctrl.cxx
vcl/source/window/dlgctrl.cxx
+14
-19
layout.cxx
vcl/source/window/layout.cxx
+11
-0
window.cxx
vcl/source/window/window.cxx
+0
-0
window2.cxx
vcl/source/window/window2.cxx
+25
-0
No files found.
vcl/inc/vcl/fixed.hxx
Dosyayı görüntüle @
9975c632
...
@@ -38,6 +38,7 @@ class VCL_DLLPUBLIC FixedText : public Control
...
@@ -38,6 +38,7 @@ class VCL_DLLPUBLIC FixedText : public Control
private
:
private
:
sal_Int32
m_nMaxWidthChars
;
sal_Int32
m_nMaxWidthChars
;
sal_Int32
m_nMinWidthChars
;
sal_Int32
m_nMinWidthChars
;
Window
*
m_pMnemonicWindow
;
using
Control
::
ImplInitSettings
;
using
Control
::
ImplInitSettings
;
using
Window
::
ImplInit
;
using
Window
::
ImplInit
;
...
@@ -55,10 +56,13 @@ protected:
...
@@ -55,10 +56,13 @@ protected:
virtual
const
Color
&
virtual
const
Color
&
GetCanonicalTextColor
(
const
StyleSettings
&
_rStyle
)
const
;
GetCanonicalTextColor
(
const
StyleSettings
&
_rStyle
)
const
;
virtual
Window
*
getAccessibleRelationLabelFor
()
const
;
public
:
public
:
FixedText
(
Window
*
pParent
,
WinBits
nStyle
=
0
);
FixedText
(
Window
*
pParent
,
WinBits
nStyle
=
0
);
FixedText
(
Window
*
pParent
,
const
ResId
&
rResId
);
FixedText
(
Window
*
pParent
,
const
ResId
&
rResId
);
FixedText
(
Window
*
pParent
,
const
ResId
&
rResId
,
bool
bDisableAccessibleLabelForRelation
);
FixedText
(
Window
*
pParent
,
const
ResId
&
rResId
,
bool
bDisableAccessibleLabelForRelation
);
~
FixedText
();
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
void
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
);
virtual
void
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
);
...
@@ -75,6 +79,8 @@ public:
...
@@ -75,6 +79,8 @@ public:
Size
CalcMinimumSize
(
long
nMaxWidth
=
0x7fffffff
)
const
;
Size
CalcMinimumSize
(
long
nMaxWidth
=
0x7fffffff
)
const
;
virtual
Size
GetOptimalSize
()
const
;
virtual
Size
GetOptimalSize
()
const
;
virtual
bool
set_property
(
const
rtl
::
OString
&
rKey
,
const
rtl
::
OString
&
rValue
);
virtual
bool
set_property
(
const
rtl
::
OString
&
rKey
,
const
rtl
::
OString
&
rValue
);
void
set_mnemonic_widget
(
Window
*
pWindow
);
Window
*
get_mnemonic_widget
()
const
{
return
m_pMnemonicWindow
;
}
};
};
class
VCL_DLLPUBLIC
SelectableFixedText
:
public
Edit
class
VCL_DLLPUBLIC
SelectableFixedText
:
public
Edit
...
...
vcl/inc/vcl/layout.hxx
Dosyayı görüntüle @
9975c632
...
@@ -44,6 +44,7 @@ public:
...
@@ -44,6 +44,7 @@ public:
protected
:
protected
:
virtual
Size
calculateRequisition
()
const
=
0
;
virtual
Size
calculateRequisition
()
const
=
0
;
virtual
void
setAllocation
(
const
Size
&
rAllocation
)
=
0
;
virtual
void
setAllocation
(
const
Size
&
rAllocation
)
=
0
;
virtual
sal_uInt16
getDefaultAccessibleRole
()
const
;
private
:
private
:
bool
m_bLayoutDirty
;
bool
m_bLayoutDirty
;
};
};
...
@@ -78,6 +79,7 @@ public:
...
@@ -78,6 +79,7 @@ public:
}
}
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
protected
:
protected
:
virtual
sal_uInt16
getDefaultAccessibleRole
()
const
;
void
accumulateMaxes
(
const
Size
&
rChildSize
,
Size
&
rSize
)
const
;
void
accumulateMaxes
(
const
Size
&
rChildSize
,
Size
&
rSize
)
const
;
Size
finalizeMaxes
(
const
Size
&
rSize
,
sal_uInt16
nVisibleChildren
)
const
;
Size
finalizeMaxes
(
const
Size
&
rSize
,
sal_uInt16
nVisibleChildren
)
const
;
...
@@ -672,6 +674,11 @@ inline bool isContainerWindow(const Window &rWindow)
...
@@ -672,6 +674,11 @@ inline bool isContainerWindow(const Window &rWindow)
return
(
eType
==
WINDOW_CONTAINER
||
eType
==
WINDOW_SCROLLWINDOW
);
return
(
eType
==
WINDOW_CONTAINER
||
eType
==
WINDOW_SCROLLWINDOW
);
}
}
inline
bool
isContainerWindow
(
const
Window
*
pWindow
)
{
return
pWindow
&&
isContainerWindow
(
*
pWindow
);
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/vcl/window.hxx
Dosyayı görüntüle @
9975c632
...
@@ -53,6 +53,7 @@ class Cursor;
...
@@ -53,6 +53,7 @@ class Cursor;
class
DockingManager
;
class
DockingManager
;
class
ScrollBar
;
class
ScrollBar
;
class
Bitmap
;
class
Bitmap
;
class
FixedText
;
class
Image
;
class
Image
;
class
MouseEvent
;
class
MouseEvent
;
class
KeyEvent
;
class
KeyEvent
;
...
@@ -571,6 +572,15 @@ protected:
...
@@ -571,6 +572,15 @@ protected:
// FIXME: this is a hack to workaround missing layout functionality
// FIXME: this is a hack to workaround missing layout functionality
SAL_DLLPRIVATE
void
ImplAdjustNWFSizes
();
SAL_DLLPRIVATE
void
ImplAdjustNWFSizes
();
// These eventually are supposed to go when everything is converted to .ui
SAL_DLLPRIVATE
Window
*
getLegacyNonLayoutAccessibleRelationMemberOf
()
const
;
SAL_DLLPRIVATE
Window
*
getLegacyNonLayoutAccessibleRelationLabeledBy
()
const
;
SAL_DLLPRIVATE
Window
*
getLegacyNonLayoutAccessibleRelationLabelFor
()
const
;
// Let Label override the code part of GetAccessibleRelationLabelFor
virtual
Window
*
getAccessibleRelationLabelFor
()
const
;
virtual
sal_uInt16
getDefaultAccessibleRole
()
const
;
public
:
public
:
// Single argument ctors shall be explicit.
// Single argument ctors shall be explicit.
explicit
Window
(
Window
*
pParent
,
WinBits
nStyle
=
0
);
explicit
Window
(
Window
*
pParent
,
WinBits
nStyle
=
0
);
...
@@ -1222,6 +1232,13 @@ public:
...
@@ -1222,6 +1232,13 @@ public:
void
add_to_size_group
(
boost
::
shared_ptr
<
VclSizeGroup
>
xGroup
);
void
add_to_size_group
(
boost
::
shared_ptr
<
VclSizeGroup
>
xGroup
);
void
remove_from_all_size_groups
();
void
remove_from_all_size_groups
();
/*
* add/remove mnemonic label
*/
void
add_mnemonic_label
(
FixedText
*
pLabel
);
void
remove_mnemonic_label
(
FixedText
*
pLabel
);
std
::
vector
<
FixedText
*>
list_mnemonic_labels
()
const
;
/*
/*
* Move this widget to be the nNewPosition'd child of its parent
* Move this widget to be the nNewPosition'd child of its parent
*/
*/
...
...
vcl/inc/window.h
Dosyayı görüntüle @
9975c632
...
@@ -43,6 +43,7 @@ struct SalPaintEvent;
...
@@ -43,6 +43,7 @@ struct SalPaintEvent;
struct
ImplDelData
;
struct
ImplDelData
;
struct
ImplAccessibleInfos
;
struct
ImplAccessibleInfos
;
class
FixedText
;
class
Window
;
class
Window
;
class
VclSizeGroup
;
class
VclSizeGroup
;
class
VirtualDevice
;
class
VirtualDevice
;
...
@@ -285,6 +286,7 @@ public:
...
@@ -285,6 +286,7 @@ public:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindowPeer
>
mxWindowPeer
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindowPeer
>
mxWindowPeer
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
mxAccessible
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
mxAccessible
;
::
boost
::
shared_ptr
<
VclSizeGroup
>
m_xSizeGroup
;
::
boost
::
shared_ptr
<
VclSizeGroup
>
m_xSizeGroup
;
::
std
::
vector
<
FixedText
*
>
m_aMnemonicLabels
;
ImplAccessibleInfos
*
mpAccessibleInfos
;
ImplAccessibleInfos
*
mpAccessibleInfos
;
VCLXWindow
*
mpVCLXWindow
;
VCLXWindow
*
mpVCLXWindow
;
Region
maWinRegion
;
// region to 'shape' the VCL window (frame coordinates)
Region
maWinRegion
;
// region to 'shape' the VCL window (frame coordinates)
...
...
vcl/source/control/fixed.cxx
Dosyayı görüntüle @
9975c632
...
@@ -151,6 +151,7 @@ FixedText::FixedText( Window* pParent, WinBits nStyle )
...
@@ -151,6 +151,7 @@ FixedText::FixedText( Window* pParent, WinBits nStyle )
:
Control
(
WINDOW_FIXEDTEXT
)
:
Control
(
WINDOW_FIXEDTEXT
)
,
m_nMaxWidthChars
(
-
1
)
,
m_nMaxWidthChars
(
-
1
)
,
m_nMinWidthChars
(
-
1
)
,
m_nMinWidthChars
(
-
1
)
,
m_pMnemonicWindow
(
NULL
)
{
{
ImplInit
(
pParent
,
nStyle
);
ImplInit
(
pParent
,
nStyle
);
}
}
...
@@ -161,6 +162,7 @@ FixedText::FixedText( Window* pParent, const ResId& rResId )
...
@@ -161,6 +162,7 @@ FixedText::FixedText( Window* pParent, const ResId& rResId )
:
Control
(
WINDOW_FIXEDTEXT
)
:
Control
(
WINDOW_FIXEDTEXT
)
,
m_nMaxWidthChars
(
-
1
)
,
m_nMaxWidthChars
(
-
1
)
,
m_nMinWidthChars
(
-
1
)
,
m_nMinWidthChars
(
-
1
)
,
m_pMnemonicWindow
(
NULL
)
{
{
rResId
.
SetRT
(
RSC_TEXT
);
rResId
.
SetRT
(
RSC_TEXT
);
WinBits
nStyle
=
ImplInitRes
(
rResId
);
WinBits
nStyle
=
ImplInitRes
(
rResId
);
...
@@ -177,6 +179,7 @@ FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessi
...
@@ -177,6 +179,7 @@ FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessi
:
Control
(
WINDOW_FIXEDTEXT
)
:
Control
(
WINDOW_FIXEDTEXT
)
,
m_nMaxWidthChars
(
-
1
)
,
m_nMaxWidthChars
(
-
1
)
,
m_nMinWidthChars
(
-
1
)
,
m_nMinWidthChars
(
-
1
)
,
m_pMnemonicWindow
(
NULL
)
{
{
rResId
.
SetRT
(
RSC_TEXT
);
rResId
.
SetRT
(
RSC_TEXT
);
WinBits
nStyle
=
ImplInitRes
(
rResId
);
WinBits
nStyle
=
ImplInitRes
(
rResId
);
...
@@ -476,6 +479,34 @@ bool FixedText::set_property(const rtl::OString &rKey, const rtl::OString &rValu
...
@@ -476,6 +479,34 @@ bool FixedText::set_property(const rtl::OString &rKey, const rtl::OString &rValu
return
true
;
return
true
;
}
}
Window
*
FixedText
::
getAccessibleRelationLabelFor
()
const
{
Window
*
pWindow
=
Control
::
getAccessibleRelationLabelFor
();
if
(
pWindow
)
return
pWindow
;
return
get_mnemonic_widget
();
}
void
FixedText
::
set_mnemonic_widget
(
Window
*
pWindow
)
{
if
(
pWindow
==
m_pMnemonicWindow
)
return
;
if
(
m_pMnemonicWindow
)
{
Window
*
pTempReEntryGuard
=
m_pMnemonicWindow
;
m_pMnemonicWindow
=
NULL
;
pTempReEntryGuard
->
remove_mnemonic_label
(
this
);
}
m_pMnemonicWindow
=
pWindow
;
if
(
m_pMnemonicWindow
)
m_pMnemonicWindow
->
add_mnemonic_label
(
this
);
}
FixedText
::~
FixedText
()
{
set_mnemonic_widget
(
NULL
);
}
SelectableFixedText
::
SelectableFixedText
(
Window
*
pParent
,
WinBits
nStyle
)
SelectableFixedText
::
SelectableFixedText
(
Window
*
pParent
,
WinBits
nStyle
)
:
Edit
(
pParent
,
nStyle
)
:
Edit
(
pParent
,
nStyle
)
{
{
...
...
vcl/source/window/dlgctrl.cxx
Dosyayı görüntüle @
9975c632
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <window.h>
#include <window.h>
#include <vcl/event.hxx>
#include <vcl/event.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabpage.hxx>
...
@@ -434,6 +435,16 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni
...
@@ -434,6 +435,16 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni
cCompareChar
=
xCharClass
->
toUpper
(
rtl
::
OUString
(
cCompareChar
),
0
,
1
,
rLocale
)[
0
];
cCompareChar
=
xCharClass
->
toUpper
(
rtl
::
OUString
(
cCompareChar
),
0
,
1
,
rLocale
)[
0
];
if
(
cCompareChar
==
cCharCode
)
if
(
cCompareChar
==
cCharCode
)
{
{
if
(
pWindow
->
GetType
()
==
WINDOW_FIXEDTEXT
)
{
FixedText
*
pFixedText
=
static_cast
<
FixedText
*>
(
pWindow
);
Window
*
pMnemonicWidget
=
pFixedText
->
get_mnemonic_widget
();
SAL_WARN_IF
(
isContainerWindow
(
pFixedText
->
GetParent
())
&&
!
pMnemonicWidget
,
"vcl.a11y"
,
"label missing mnemonic_widget?"
);
if
(
pMnemonicWidget
)
return
pMnemonicWidget
;
}
// Bei Static-Controls auf das naechste Controlm weiterschalten
// Bei Static-Controls auf das naechste Controlm weiterschalten
if
(
(
pWindow
->
GetType
()
==
WINDOW_FIXEDTEXT
)
||
if
(
(
pWindow
->
GetType
()
==
WINDOW_FIXEDTEXT
)
||
(
pWindow
->
GetType
()
==
WINDOW_FIXEDLINE
)
||
(
pWindow
->
GetType
()
==
WINDOW_FIXEDLINE
)
||
...
@@ -1207,15 +1218,8 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
...
@@ -1207,15 +1218,8 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
return
pWindow
;
return
pWindow
;
}
}
Window
*
Window
::
Ge
tAccessibleRelationLabelFor
()
const
Window
*
Window
::
getLegacyNonLayou
tAccessibleRelationLabelFor
()
const
{
{
if
(
mpWindowImpl
->
mbDisableAccessibleLabelForRelation
)
return
NULL
;
if
(
mpWindowImpl
->
mpAccessibleInfos
&&
mpWindowImpl
->
mpAccessibleInfos
->
pLabelForWindow
)
return
mpWindowImpl
->
mpAccessibleInfos
->
pLabelForWindow
;
Window
*
pWindow
=
NULL
;
Window
*
pWindow
=
NULL
;
Window
*
pFrameWindow
=
ImplGetFrameWindow
();
Window
*
pFrameWindow
=
ImplGetFrameWindow
();
...
@@ -1296,14 +1300,8 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
...
@@ -1296,14 +1300,8 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
return
pWindow
;
return
pWindow
;
}
}
Window
*
Window
::
Ge
tAccessibleRelationLabeledBy
()
const
Window
*
Window
::
getLegacyNonLayou
tAccessibleRelationLabeledBy
()
const
{
{
if
(
mpWindowImpl
->
mbDisableAccessibleLabeledByRelation
)
return
NULL
;
if
(
mpWindowImpl
->
mpAccessibleInfos
&&
mpWindowImpl
->
mpAccessibleInfos
->
pLabeledByWindow
)
return
mpWindowImpl
->
mpAccessibleInfos
->
pLabeledByWindow
;
Window
*
pWindow
=
NULL
;
Window
*
pWindow
=
NULL
;
Window
*
pFrameWindow
=
ImplGetFrameWindow
();
Window
*
pFrameWindow
=
ImplGetFrameWindow
();
...
@@ -1332,11 +1330,8 @@ Window* Window::GetAccessibleRelationLabeledBy() const
...
@@ -1332,11 +1330,8 @@ Window* Window::GetAccessibleRelationLabeledBy() const
return
pWindow
;
return
pWindow
;
}
}
Window
*
Window
::
Ge
tAccessibleRelationMemberOf
()
const
Window
*
Window
::
getLegacyNonLayou
tAccessibleRelationMemberOf
()
const
{
{
if
(
mpWindowImpl
->
mpAccessibleInfos
&&
mpWindowImpl
->
mpAccessibleInfos
->
pMemberOfWindow
)
return
mpWindowImpl
->
mpAccessibleInfos
->
pMemberOfWindow
;
Window
*
pWindow
=
NULL
;
Window
*
pWindow
=
NULL
;
Window
*
pFrameWindow
=
GetParent
();
Window
*
pFrameWindow
=
GetParent
();
if
(
!
pFrameWindow
)
if
(
!
pFrameWindow
)
...
...
vcl/source/window/layout.cxx
Dosyayı görüntüle @
9975c632
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
*/
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <vcl/dialog.hxx>
#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
#include <vcl/layout.hxx>
#include "window.h"
#include "window.h"
...
@@ -21,6 +22,11 @@ VclContainer::VclContainer(Window *pParent, WinBits nStyle)
...
@@ -21,6 +22,11 @@ VclContainer::VclContainer(Window *pParent, WinBits nStyle)
SetBackground
();
SetBackground
();
}
}
sal_uInt16
VclContainer
::
getDefaultAccessibleRole
()
const
{
return
com
::
sun
::
star
::
accessibility
::
AccessibleRole
::
PANEL
;
}
Size
VclContainer
::
GetOptimalSize
()
const
Size
VclContainer
::
GetOptimalSize
()
const
{
{
return
calculateRequisition
();
return
calculateRequisition
();
...
@@ -296,6 +302,11 @@ bool VclBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
...
@@ -296,6 +302,11 @@ bool VclBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
return
true
;
return
true
;
}
}
sal_uInt16
VclBox
::
getDefaultAccessibleRole
()
const
{
return
com
::
sun
::
star
::
accessibility
::
AccessibleRole
::
FILLER
;
}
#define DEFAULT_CHILD_MIN_WIDTH 85
#define DEFAULT_CHILD_MIN_WIDTH 85
#define DEFAULT_CHILD_MIN_HEIGHT 27
#define DEFAULT_CHILD_MIN_HEIGHT 27
...
...
vcl/source/window/window.cxx
Dosyayı görüntüle @
9975c632
This diff is collapsed.
Click to expand it.
vcl/source/window/window2.cxx
Dosyayı görüntüle @
9975c632
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <vcl/bitmap.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/dialog.hxx>
#include <vcl/dialog.hxx>
#include <vcl/event.hxx>
#include <vcl/event.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/layout.hxx>
#include <vcl/timer.hxx>
#include <vcl/timer.hxx>
#include <vcl/metric.hxx>
#include <vcl/metric.hxx>
...
@@ -2315,4 +2316,28 @@ void Window::remove_from_all_size_groups()
...
@@ -2315,4 +2316,28 @@ void Window::remove_from_all_size_groups()
}
}
}
}
void
Window
::
add_mnemonic_label
(
FixedText
*
pLabel
)
{
std
::
vector
<
FixedText
*>&
v
=
mpWindowImpl
->
m_aMnemonicLabels
;
if
(
std
::
find
(
v
.
begin
(),
v
.
end
(),
pLabel
)
!=
v
.
end
())
return
;
v
.
push_back
(
pLabel
);
pLabel
->
set_mnemonic_widget
(
this
);
}
void
Window
::
remove_mnemonic_label
(
FixedText
*
pLabel
)
{
std
::
vector
<
FixedText
*>&
v
=
mpWindowImpl
->
m_aMnemonicLabels
;
std
::
vector
<
FixedText
*>::
iterator
aFind
=
std
::
find
(
v
.
begin
(),
v
.
end
(),
pLabel
);
if
(
aFind
==
v
.
end
())
return
;
v
.
erase
(
aFind
);
pLabel
->
set_mnemonic_widget
(
NULL
);
}
std
::
vector
<
FixedText
*>
Window
::
list_mnemonic_labels
()
const
{
return
mpWindowImpl
->
m_aMnemonicLabels
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* 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