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
7a60be6e
Kaydet (Commit)
7a60be6e
authored
Eyl 13, 2011
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move ScCheckListMenuWindow and ScMenuFloatingWindow into own files.
üst
0bc368ba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
320 additions
and
285 deletions
+320
-285
AllLangResTarget_sc.mk
sc/AllLangResTarget_sc.mk
+1
-1
Library_sc.mk
sc/Library_sc.mk
+1
-0
AccessibleFilterMenu.cxx
sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
+1
-1
AccessibleFilterMenuItem.cxx
sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx
+1
-1
AccessibleFilterTopWindow.cxx
sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx
+1
-1
checklistmenu.cxx
sc/source/ui/cctrl/checklistmenu.cxx
+0
-0
checklistmenu.src
sc/source/ui/cctrl/checklistmenu.src
+1
-1
dpcontrol.cxx
sc/source/ui/cctrl/dpcontrol.cxx
+0
-0
checklistmenu.hrc
sc/source/ui/inc/checklistmenu.hrc
+2
-2
checklistmenu.hxx
sc/source/ui/inc/checklistmenu.hxx
+309
-0
dpcontrol.hxx
sc/source/ui/inc/dpcontrol.hxx
+0
-277
gridwin.cxx
sc/source/ui/view/gridwin.cxx
+1
-0
gridwin2.cxx
sc/source/ui/view/gridwin2.cxx
+2
-1
No files found.
sc/AllLangResTarget_sc.mk
Dosyayı görüntüle @
7a60be6e
...
...
@@ -70,7 +70,7 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/sortdlg.src \
sc/source/ui/src/attrdlg.src \
sc/source/ui/src/filter.src \
sc/source/ui/cctrl/
dpcontrol
.src \
sc/source/ui/cctrl/
checklistmenu
.src \
sc/source/ui/navipi/navipi.src \
sc/source/ui/docshell/tpstat.src \
sc/source/ui/pagedlg/pagedlg.src \
...
...
sc/Library_sc.mk
Dosyayı görüntüle @
7a60be6e
...
...
@@ -308,6 +308,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/ui/attrdlg/condfrmt \
sc/source/ui/attrdlg/scabstdlg \
sc/source/ui/cctrl/cbuttonw \
sc/source/ui/cctrl/checklistmenu \
sc/source/ui/cctrl/dpcontrol \
sc/source/ui/cctrl/popmenu \
sc/source/ui/cctrl/tbinsert \
...
...
sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
Dosyayı görüntüle @
7a60be6e
...
...
@@ -41,7 +41,7 @@
#include "editeng/editdata.hxx"
#include "editeng/outliner.hxx"
#include "vcl/unohelp.hxx"
#include "
dpcontrol
.hxx"
#include "
checklistmenu
.hxx"
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
...
...
sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx
Dosyayı görüntüle @
7a60be6e
...
...
@@ -31,7 +31,7 @@
#include "precompiled_sc.hxx"
#include "AccessibleGlobal.hxx"
#include "AccessibleFilterMenuItem.hxx"
#include "
dpcontrol
.hxx"
#include "
checklistmenu
.hxx"
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
...
...
sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx
Dosyayı görüntüle @
7a60be6e
...
...
@@ -31,7 +31,7 @@
#include "precompiled_sc.hxx"
#include "AccessibleFilterTopWindow.hxx"
#include "AccessibleFilterMenu.hxx"
#include "
dpcontrol
.hxx"
#include "
checklistmenu
.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
...
...
sc/source/ui/cctrl/checklistmenu.cxx
0 → 100644
Dosyayı görüntüle @
7a60be6e
This diff is collapsed.
Click to expand it.
sc/source/ui/cctrl/
dpcontrol
.src
→
sc/source/ui/cctrl/
checklistmenu
.src
Dosyayı görüntüle @
7a60be6e
...
...
@@ -25,7 +25,7 @@
*
************************************************************************/
#include "
dpcontrol
.hrc"
#include "
checklistmenu
.hrc"
Resource RID_POPUP_FILTER
{
...
...
sc/source/ui/cctrl/dpcontrol.cxx
Dosyayı görüntüle @
7a60be6e
This diff is collapsed.
Click to expand it.
sc/source/ui/inc/
dpcontrol
.hrc
→
sc/source/ui/inc/
checklistmenu
.hrc
Dosyayı görüntüle @
7a60be6e
...
...
@@ -25,8 +25,8 @@
*
************************************************************************/
#ifndef __
DPCONTROL
_HRC__
#define __
DPCONTROL
_HRC__
#ifndef __
SC_CHECKLISTMENU
_HRC__
#define __
SC_CHECKLISTMENU
_HRC__
#include <sc.hrc>
...
...
sc/source/ui/inc/checklistmenu.hxx
0 → 100644
Dosyayı görüntüle @
7a60be6e
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2011 Kohei Yoshida <kohei.yoshida@suse.com>
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#ifndef __SC_CHECKLISTMENU_HXX__
#define __SC_CHECKLISTMENU_HXX__
#include "vcl/popupmenuwindow.hxx"
#include "vcl/button.hxx"
#include "vcl/scrbar.hxx"
#include "vcl/timer.hxx"
#include "svx/checklbx.hxx"
#include <memory>
#include <boost/unordered_map.hpp>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
accessibility
{
class
XAccessible
;
}
}}}
class
ScDocument
;
class
ScAccessibleFilterMenu
;
class
ScMenuFloatingWindow
:
public
PopupMenuFloatingWindow
{
public
:
static
size_t
MENU_NOT_SELECTED
;
/**
* Action to perform when an event takes place. Create a sub-class of
* this to implement the desired action.
*/
class
Action
{
public
:
virtual
void
execute
()
=
0
;
};
explicit
ScMenuFloatingWindow
(
Window
*
pParent
,
ScDocument
*
pDoc
,
sal_uInt16
nMenuStackLevel
=
0
);
virtual
~
ScMenuFloatingWindow
();
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
virtual
void
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
virtual
void
KeyInput
(
const
KeyEvent
&
rKEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
CreateAccessible
();
void
addMenuItem
(
const
::
rtl
::
OUString
&
rText
,
bool
bEnabled
,
Action
*
pAction
);
ScMenuFloatingWindow
*
addSubMenuItem
(
const
::
rtl
::
OUString
&
rText
,
bool
bEnabled
);
void
setSelectedMenuItem
(
size_t
nPos
,
bool
bSubMenuTimer
,
bool
bEnsureSubMenu
);
void
selectMenuItem
(
size_t
nPos
,
bool
bSelected
,
bool
bSubMenuTimer
);
void
clearSelectedMenuItem
();
ScMenuFloatingWindow
*
getSubMenuWindow
(
size_t
nPos
)
const
;
bool
isMenuItemSelected
(
size_t
nPos
)
const
;
size_t
getSelectedMenuItem
()
const
;
void
setName
(
const
::
rtl
::
OUString
&
rName
);
const
::
rtl
::
OUString
&
getName
()
const
;
void
executeMenuItem
(
size_t
nPos
);
void
getMenuItemPosSize
(
size_t
nPos
,
Point
&
rPos
,
Size
&
rSize
)
const
;
ScMenuFloatingWindow
*
getParentMenuWindow
()
const
;
protected
:
void
drawMenuItem
(
size_t
nPos
);
void
drawAllMenuItems
();
const
Font
&
getLabelFont
()
const
;
void
queueLaunchSubMenu
(
size_t
nPos
,
ScMenuFloatingWindow
*
pMenu
);
void
queueCloseSubMenu
();
void
launchSubMenu
(
bool
bSetMenuPos
);
void
endSubMenu
(
ScMenuFloatingWindow
*
pSubMenu
);
void
fillMenuItemsToAccessible
(
ScAccessibleFilterMenu
*
pAccMenu
)
const
;
ScDocument
*
getDoc
();
protected
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
mxAccessible
;
private
:
struct
SubMenuItemData
;
void
handleMenuTimeout
(
SubMenuItemData
*
pTimer
);
void
resizeToFitMenuItems
();
void
highlightMenuItem
(
size_t
nPos
,
bool
bSelected
);
size_t
getEnclosingMenuItem
(
const
Point
&
rPos
)
const
;
size_t
getSubMenuPos
(
ScMenuFloatingWindow
*
pSubMenu
);
/**
* Fire a menu highlight event since the accessibility framework needs
* this to track focus on menu items.
*/
void
fireMenuHighlightedEvent
();
/**
* Make sure that the specified submenu is permanently up, the submenu
* close timer is not active, and the correct menu item associated with
* the submenu is highlighted.
*/
void
setSubMenuFocused
(
ScMenuFloatingWindow
*
pSubMenu
);
/**
* When a menu item of an invisible submenu is selected, we need to make
* sure that all its parent menu(s) are visible, with the right menu item
* highlighted in each of the parents. Calling this method ensures it.
*/
void
ensureSubMenuVisible
(
ScMenuFloatingWindow
*
pSubMenu
);
/**
* Dismiss any visible child submenus when a menu item of a parent menu is
* selected.
*/
void
ensureSubMenuNotVisible
();
/**
* Dismiss all visible popup menus and set focus back to the application
* window. This method is called e.g. when a menu action is fired.
*/
void
terminateAllPopupMenus
();
DECL_LINK
(
PopupEndHdl
,
void
*
);
private
:
struct
MenuItemData
{
::
rtl
::
OUString
maText
;
bool
mbEnabled
;
::
boost
::
shared_ptr
<
Action
>
mpAction
;
::
boost
::
shared_ptr
<
ScMenuFloatingWindow
>
mpSubMenuWin
;
MenuItemData
();
};
::
std
::
vector
<
MenuItemData
>
maMenuItems
;
struct
SubMenuItemData
{
Timer
maTimer
;
ScMenuFloatingWindow
*
mpSubMenu
;
size_t
mnMenuPos
;
DECL_LINK
(
TimeoutHdl
,
void
*
);
SubMenuItemData
(
ScMenuFloatingWindow
*
pParent
);
void
reset
();
private
:
ScMenuFloatingWindow
*
mpParent
;
};
SubMenuItemData
maOpenTimer
;
SubMenuItemData
maCloseTimer
;
Font
maLabelFont
;
// Name of this menu window, taken from the menu item of the parent window
// that launches it (if this is a sub menu). If this is a top-level menu
// window, then this name can be anything.
::
rtl
::
OUString
maName
;
size_t
mnSelectedMenu
;
size_t
mnClickedMenu
;
ScDocument
*
mpDoc
;
ScMenuFloatingWindow
*
mpParentMenu
;
ScMenuFloatingWindow
*
mpActiveSubMenu
;
};
/**
* This class implements a popup window for field button, for quick access
* of hide-item list, and possibly more stuff related to field options.
*/
class
ScCheckListMenuWindow
:
public
ScMenuFloatingWindow
{
public
:
/**
* Extended data that the client code may need to store. Create a
* sub-class of this and store data there.
*/
struct
ExtendedData
{};
explicit
ScCheckListMenuWindow
(
Window
*
pParent
,
ScDocument
*
pDoc
);
virtual
~
ScCheckListMenuWindow
();
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
long
Notify
(
NotifyEvent
&
rNEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
Window
*
GetPreferredKeyInputWindow
();
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
CreateAccessible
();
void
setMemberSize
(
size_t
n
);
void
addMember
(
const
::
rtl
::
OUString
&
rName
,
bool
bVisible
);
void
initMembers
();
const
Size
&
getWindowSize
()
const
;
void
getResult
(
::
boost
::
unordered_map
<
::
rtl
::
OUString
,
bool
,
::
rtl
::
OUStringHash
>&
rResult
);
void
close
(
bool
bOK
);
/**
* Set auxiliary data that the client code might need. Note that this
* popup window class manages its life time; no explicit deletion of the
* instance is needed in the client code.
*/
void
setExtendedData
(
ExtendedData
*
p
);
/**
* Get the store auxiliary data, or NULL if no such data is stored.
*/
ExtendedData
*
getExtendedData
();
void
setOKAction
(
Action
*
p
);
private
:
struct
Member
{
::
rtl
::
OUString
maName
;
bool
mbVisible
;
Member
();
};
class
CancelButton
:
public
::
CancelButton
{
public
:
CancelButton
(
ScCheckListMenuWindow
*
pParent
);
virtual
void
Click
();
private
:
ScCheckListMenuWindow
*
mpParent
;
};
enum
SectionType
{
WHOLE
,
// entire window
LISTBOX_AREA_OUTER
,
// box enclosing the check box items.
LISTBOX_AREA_INNER
,
// box enclosing the check box items.
SINGLE_BTN_AREA
,
// box enclosing the single-action buttons.
CHECK_TOGGLE_ALL
,
// check box for toggling all items.
BTN_SINGLE_SELECT
,
BTN_SINGLE_UNSELECT
,
BTN_OK
,
// OK button
BTN_CANCEL
,
// Cancel button
};
void
getSectionPosSize
(
Point
&
rPos
,
Size
&
rSize
,
SectionType
eType
)
const
;
void
setAllMemberState
(
bool
bSet
);
void
selectCurrentMemberOnly
(
bool
bSet
);
void
cycleFocus
(
bool
bReverse
=
false
);
DECL_LINK
(
ButtonHdl
,
Button
*
);
DECL_LINK
(
TriStateHdl
,
TriStateBox
*
);
DECL_LINK
(
CheckHdl
,
SvTreeListBox
*
);
private
:
SvxCheckListBox
maChecks
;
TriStateBox
maChkToggleAll
;
ImageButton
maBtnSelectSingle
;
ImageButton
maBtnUnselectSingle
;
OKButton
maBtnOk
;
CancelButton
maBtnCancel
;
::
std
::
vector
<
Window
*>
maTabStopCtrls
;
size_t
mnCurTabStop
;
::
std
::
vector
<
Member
>
maMembers
;
::
std
::
auto_ptr
<
ExtendedData
>
mpExtendedData
;
::
std
::
auto_ptr
<
Action
>
mpOKAction
;
const
Size
maWndSize
;
/// hard-coded window size.
TriState
mePrevToggleAllState
;
};
#endif
sc/source/ui/inc/dpcontrol.hxx
Dosyayı görüntüle @
7a60be6e
...
...
@@ -32,23 +32,9 @@
#include "rtl/ustring.hxx"
#include "tools/gen.hxx"
#include "tools/fract.hxx"
#include "vcl/popupmenuwindow.hxx"
#include "vcl/button.hxx"
#include "vcl/scrbar.hxx"
#include "vcl/timer.hxx"
#include "svx/checklbx.hxx"
#include <boost/shared_ptr.hpp>
#include <memory>
#include <boost/unordered_map.hpp>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
accessibility
{
class
XAccessible
;
}
}}}
class
OutputDevice
;
class
Point
;
...
...
@@ -56,7 +42,6 @@ class Size;
class
StyleSettings
;
class
Window
;
class
ScDocument
;
class
ScAccessibleFilterMenu
;
/**
* This class takes care of physically drawing field button controls inside
...
...
@@ -99,268 +84,6 @@ private:
bool
mbPopupLeft
;
};
// ============================================================================
class
ScMenuFloatingWindow
:
public
PopupMenuFloatingWindow
{
public
:
static
size_t
MENU_NOT_SELECTED
;
/**
* Action to perform when an event takes place. Create a sub-class of
* this to implement the desired action.
*/
class
Action
{
public
:
virtual
void
execute
()
=
0
;
};
explicit
ScMenuFloatingWindow
(
Window
*
pParent
,
ScDocument
*
pDoc
,
sal_uInt16
nMenuStackLevel
=
0
);
virtual
~
ScMenuFloatingWindow
();
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
virtual
void
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
virtual
void
KeyInput
(
const
KeyEvent
&
rKEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
CreateAccessible
();
void
addMenuItem
(
const
::
rtl
::
OUString
&
rText
,
bool
bEnabled
,
Action
*
pAction
);
ScMenuFloatingWindow
*
addSubMenuItem
(
const
::
rtl
::
OUString
&
rText
,
bool
bEnabled
);
void
setSelectedMenuItem
(
size_t
nPos
,
bool
bSubMenuTimer
,
bool
bEnsureSubMenu
);
void
selectMenuItem
(
size_t
nPos
,
bool
bSelected
,
bool
bSubMenuTimer
);
void
clearSelectedMenuItem
();
ScMenuFloatingWindow
*
getSubMenuWindow
(
size_t
nPos
)
const
;
bool
isMenuItemSelected
(
size_t
nPos
)
const
;
size_t
getSelectedMenuItem
()
const
;
void
setName
(
const
::
rtl
::
OUString
&
rName
);
const
::
rtl
::
OUString
&
getName
()
const
;
void
executeMenuItem
(
size_t
nPos
);
void
getMenuItemPosSize
(
size_t
nPos
,
Point
&
rPos
,
Size
&
rSize
)
const
;
ScMenuFloatingWindow
*
getParentMenuWindow
()
const
;
protected
:
void
drawMenuItem
(
size_t
nPos
);
void
drawAllMenuItems
();
const
Font
&
getLabelFont
()
const
;
void
queueLaunchSubMenu
(
size_t
nPos
,
ScMenuFloatingWindow
*
pMenu
);
void
queueCloseSubMenu
();
void
launchSubMenu
(
bool
bSetMenuPos
);
void
endSubMenu
(
ScMenuFloatingWindow
*
pSubMenu
);
void
fillMenuItemsToAccessible
(
ScAccessibleFilterMenu
*
pAccMenu
)
const
;
ScDocument
*
getDoc
();
protected
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
mxAccessible
;
private
:
struct
SubMenuItemData
;
void
handleMenuTimeout
(
SubMenuItemData
*
pTimer
);
void
resizeToFitMenuItems
();
void
highlightMenuItem
(
size_t
nPos
,
bool
bSelected
);
size_t
getEnclosingMenuItem
(
const
Point
&
rPos
)
const
;
size_t
getSubMenuPos
(
ScMenuFloatingWindow
*
pSubMenu
);
/**
* Fire a menu highlight event since the accessibility framework needs
* this to track focus on menu items.
*/
void
fireMenuHighlightedEvent
();
/**
* Make sure that the specified submenu is permanently up, the submenu
* close timer is not active, and the correct menu item associated with
* the submenu is highlighted.
*/
void
setSubMenuFocused
(
ScMenuFloatingWindow
*
pSubMenu
);
/**
* When a menu item of an invisible submenu is selected, we need to make
* sure that all its parent menu(s) are visible, with the right menu item
* highlighted in each of the parents. Calling this method ensures it.
*/
void
ensureSubMenuVisible
(
ScMenuFloatingWindow
*
pSubMenu
);
/**
* Dismiss any visible child submenus when a menu item of a parent menu is
* selected.
*/
void
ensureSubMenuNotVisible
();
/**
* Dismiss all visible popup menus and set focus back to the application
* window. This method is called e.g. when a menu action is fired.
*/
void
terminateAllPopupMenus
();
DECL_LINK
(
PopupEndHdl
,
void
*
);
private
:
struct
MenuItemData
{
::
rtl
::
OUString
maText
;
bool
mbEnabled
;
::
boost
::
shared_ptr
<
Action
>
mpAction
;
::
boost
::
shared_ptr
<
ScMenuFloatingWindow
>
mpSubMenuWin
;
MenuItemData
();
};
::
std
::
vector
<
MenuItemData
>
maMenuItems
;
struct
SubMenuItemData
{
Timer
maTimer
;
ScMenuFloatingWindow
*
mpSubMenu
;
size_t
mnMenuPos
;
DECL_LINK
(
TimeoutHdl
,
void
*
);
SubMenuItemData
(
ScMenuFloatingWindow
*
pParent
);
void
reset
();
private
:
ScMenuFloatingWindow
*
mpParent
;
};
SubMenuItemData
maOpenTimer
;
SubMenuItemData
maCloseTimer
;
Font
maLabelFont
;
// Name of this menu window, taken from the menu item of the parent window
// that launches it (if this is a sub menu). If this is a top-level menu
// window, then this name can be anything.
::
rtl
::
OUString
maName
;
size_t
mnSelectedMenu
;
size_t
mnClickedMenu
;
ScDocument
*
mpDoc
;
ScMenuFloatingWindow
*
mpParentMenu
;
ScMenuFloatingWindow
*
mpActiveSubMenu
;
};
// ============================================================================
/**
* This class implements a popup window for field button, for quick access
* of hide-item list, and possibly more stuff related to field options.
*/
class
ScCheckListMenuWindow
:
public
ScMenuFloatingWindow
{
public
:
/**
* Extended data that the client code may need to store. Create a
* sub-class of this and store data there.
*/
struct
ExtendedData
{};
explicit
ScCheckListMenuWindow
(
Window
*
pParent
,
ScDocument
*
pDoc
);
virtual
~
ScCheckListMenuWindow
();
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
long
Notify
(
NotifyEvent
&
rNEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
Window
*
GetPreferredKeyInputWindow
();
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
CreateAccessible
();
void
setMemberSize
(
size_t
n
);
void
addMember
(
const
::
rtl
::
OUString
&
rName
,
bool
bVisible
);
void
initMembers
();
const
Size
&
getWindowSize
()
const
;
void
getResult
(
::
boost
::
unordered_map
<
::
rtl
::
OUString
,
bool
,
::
rtl
::
OUStringHash
>&
rResult
);
void
close
(
bool
bOK
);
/**
* Set auxiliary data that the client code might need. Note that this
* popup window class manages its life time; no explicit deletion of the
* instance is needed in the client code.
*/
void
setExtendedData
(
ExtendedData
*
p
);
/**
* Get the store auxiliary data, or NULL if no such data is stored.
*/
ExtendedData
*
getExtendedData
();
void
setOKAction
(
Action
*
p
);
private
:
struct
Member
{
::
rtl
::
OUString
maName
;
bool
mbVisible
;
Member
();
};
class
CancelButton
:
public
::
CancelButton
{
public
:
CancelButton
(
ScCheckListMenuWindow
*
pParent
);
virtual
void
Click
();
private
:
ScCheckListMenuWindow
*
mpParent
;
};
enum
SectionType
{
WHOLE
,
// entire window
LISTBOX_AREA_OUTER
,
// box enclosing the check box items.
LISTBOX_AREA_INNER
,
// box enclosing the check box items.
SINGLE_BTN_AREA
,
// box enclosing the single-action buttons.
CHECK_TOGGLE_ALL
,
// check box for toggling all items.
BTN_SINGLE_SELECT
,
BTN_SINGLE_UNSELECT
,
BTN_OK
,
// OK button
BTN_CANCEL
,
// Cancel button
};
void
getSectionPosSize
(
Point
&
rPos
,
Size
&
rSize
,
SectionType
eType
)
const
;
void
setAllMemberState
(
bool
bSet
);
void
selectCurrentMemberOnly
(
bool
bSet
);
void
cycleFocus
(
bool
bReverse
=
false
);
DECL_LINK
(
ButtonHdl
,
Button
*
);
DECL_LINK
(
TriStateHdl
,
TriStateBox
*
);
DECL_LINK
(
CheckHdl
,
SvTreeListBox
*
);
private
:
SvxCheckListBox
maChecks
;
TriStateBox
maChkToggleAll
;
ImageButton
maBtnSelectSingle
;
ImageButton
maBtnUnselectSingle
;
OKButton
maBtnOk
;
CancelButton
maBtnCancel
;
::
std
::
vector
<
Window
*>
maTabStopCtrls
;
size_t
mnCurTabStop
;
::
std
::
vector
<
Member
>
maMembers
;
::
std
::
auto_ptr
<
ExtendedData
>
mpExtendedData
;
::
std
::
auto_ptr
<
Action
>
mpOKAction
;
const
Size
maWndSize
;
/// hard-coded window size.
TriState
mePrevToggleAllState
;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/view/gridwin.cxx
Dosyayı görüntüle @
7a60be6e
...
...
@@ -124,6 +124,7 @@
#include "tabprotection.hxx"
#include "postit.hxx"
#include "dpcontrol.hxx"
#include "checklistmenu.hxx"
#include "clipparam.hxx"
#include "cellsh.hxx"
#include "overlayobject.hxx"
...
...
sc/source/ui/view/gridwin2.cxx
Dosyayı görüntüle @
7a60be6e
...
...
@@ -52,8 +52,9 @@
#include "dpoutput.hxx" // ScDPPositionData
#include "dpshttab.hxx"
#include "dbdocfun.hxx"
#include "checklistmenu.hxx"
#include "dpcontrol.hxx"
#include "
dpcontrol
.hrc"
#include "
checklistmenu
.hrc"
#include "strload.hxx"
#include "userlist.hxx"
...
...
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