LibreOffice Module fpicker (master) 1
|
#include <ControlHelper.hxx>
Public Types | |
enum | ToggleType { AUTOEXTENSION , PASSWORD , GPGENCRYPTION , FILTEROPTIONS , READONLY , LINK , PREVIEW , SELECTION , TOGGLE_LAST } |
enum | ListType { VERSION , TEMPLATE , IMAGE_TEMPLATE , IMAGE_ANCHOR , LIST_LAST } |
Public Member Functions | |
ControlHelper () | |
virtual | ~ControlHelper () |
void | initialize (sal_Int16 templateId) |
void | setValue (sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any &rValue) |
uno::Any | getValue (sal_Int16 nControlId, sal_Int16 nControlAction) const |
void | enableControl (sal_Int16 nControlId, bool bEnable) const |
OUString | getLabel (sal_Int16 nControlId) |
void | setLabel (sal_Int16 nControlId, NSString *aLabel) |
void | updateFilterUI () |
NSView * | getUserPane () |
bool | getVisibility (ToggleType tToggle) |
void | setFilterControlNeeded (bool bNeeded) |
void | setFilterHelper (FilterHelper *pFilterHelper) |
void | setFilePickerDelegate (AquaFilePickerDelegate *pDelegate) |
bool | isAutoExtensionEnabled () |
Private Member Functions | |
void | HandleSetListValue (const NSControl *pControl, const sal_Int16 nControlAction, const uno::Any &rValue) |
void | createControls () |
void | createFilterControl () |
void | createUserPane () |
NSControl * | getControl (const sal_Int16 nControlId) const |
void | layoutControls () |
Static Private Member Functions | |
static int | getControlElementName (const Class clazz, const int nControlId) |
static int | getVerticalDistance (const NSControl *first, const NSControl *second) |
Private Attributes | |
NSView * | m_pUserPane |
the native view object More... | |
NSControl * | m_pToggles [TOGGLE_LAST] |
the checkbox controls More... | |
bool | m_bToggleVisibility [TOGGLE_LAST] |
the visibility flags for the checkboxes More... | |
NSPopUpButton * | m_pFilterControl |
the special filter control More... | |
NSControl * | m_pListControls [LIST_LAST] |
the popup menu controls (except for the filter control) More... | |
::std::map< NSControl *, NSString * > | m_aMapListLabels |
a map to store a control's label text More... | |
::std::map< NSPopUpButton *, NSTextField * > | m_aMapListLabelFields |
a map to store a popup menu's label text field More... | |
bool | m_bListVisibility [LIST_LAST] |
the visibility flags for the popup menus More... | |
bool | m_bUserPaneNeeded |
indicates if a user pane is needed More... | |
bool | m_bIsUserPaneLaidOut |
indicates if the user pane was laid out already More... | |
bool | m_bIsFilterControlNeeded |
indicates if a filter control is needed More... | |
::std::list< NSControl * > | m_aActiveControls |
a list with all actively used controls More... | |
FilterHelper * | m_pFilterHelper |
the filter helper More... | |
AquaFilePickerDelegate * | m_pDelegate |
the save or open panel's delegate More... | |
Definition at line 37 of file ControlHelper.hxx.
Enumerator | |
---|---|
VERSION | |
TEMPLATE | |
IMAGE_TEMPLATE | |
IMAGE_ANCHOR | |
LIST_LAST |
Definition at line 81 of file ControlHelper.hxx.
Enumerator | |
---|---|
AUTOEXTENSION | |
PASSWORD | |
GPGENCRYPTION | |
FILTEROPTIONS | |
READONLY | |
LINK | |
PREVIEW | |
SELECTION | |
TOGGLE_LAST |
Definition at line 69 of file ControlHelper.hxx.
ControlHelper::ControlHelper | ( | ) |
Definition at line 127 of file ControlHelper.mm.
References i, LIST_LAST, m_bListVisibility, m_bToggleVisibility, and TOGGLE_LAST.
|
virtual |
Definition at line 146 of file ControlHelper.mm.
References m_aActiveControls, m_aMapListLabelFields, m_aMapListLabels, m_pFilterControl, and m_pUserPane.
|
private |
Definition at line 526 of file ControlHelper.mm.
References AUTOEXTENSION, getControlElementName(), CResourceProvider::getResString(), i, IMAGE_ANCHOR, IMAGE_TEMPLATE, LIST_LAST, m_aActiveControls, m_bListVisibility, m_bToggleVisibility, m_bUserPaneNeeded, m_pDelegate, m_pListControls, m_pToggles, MAP_LIST_, NO, PREVIEW, TEMPLATE, TOGGLE_LAST, and VERSION.
Referenced by initialize().
|
private |
Definition at line 873 of file ControlHelper.mm.
References FilterHelper::getFilterNames(), CResourceProvider::getResString(), m_aActiveControls, m_aMapListLabels, m_pDelegate, m_pFilterControl, m_pFilterHelper, and SAL_INFO.
Referenced by createUserPane(), and updateFilterUI().
|
private |
Definition at line 366 of file ControlHelper.mm.
References createFilterControl(), kAquaPopupButtonDefaultHeight, kAquaSpaceAfterPopupButtonsV, kAquaSpaceBetweenControls, kAquaSpaceBetweenPopupMenus, kAquaSpaceBoxFrameViewDiffBottom, kAquaSpaceBoxFrameViewDiffTop, kAquaSpaceInsideGroupH, kAquaSpaceLabelFrameBoundsDiffH, kAquaSpacePopupMenuFrameBoundsDiffLeft, kAquaSpacePopupMenuFrameBoundsDiffV, kAquaSpaceSwitchButtonFrameBoundsDiff, label(), layoutControls(), m_aActiveControls, m_aMapListLabelFields, m_aMapListLabels, m_bIsFilterControlNeeded, m_bUserPaneNeeded, m_pFilterControl, m_pUserPane, POPUP_WIDTH_MAX, POPUP_WIDTH_MIN, and SAL_INFO.
Referenced by getUserPane().
void ControlHelper::enableControl | ( | sal_Int16 | nControlId, |
bool | bEnable | ||
) | const |
Definition at line 239 of file ControlHelper.mm.
References getControl(), nControlId, and SAL_INFO.
Referenced by SalAquaFilePicker::enableControl().
|
private |
Definition at line 708 of file ControlHelper.mm.
References AUTOEXTENSION, FILTEROPTIONS, GPGENCRYPTION, IMAGE_ANCHOR, IMAGE_TEMPLATE, LINK, MAP_LIST, MAP_LIST_LABEL, MAP_TOGGLE, nControlId, PASSWORD, PREVIEW, READONLY, SAL_INFO, SELECTION, TEMPLATE, and VERSION.
Referenced by enableControl(), getLabel(), getValue(), setLabel(), and setValue().
Definition at line 599 of file ControlHelper.mm.
References AUTOEXTENSION, FILTEROPTIONS, GPGENCRYPTION, IMAGE_ANCHOR, IMAGE_TEMPLATE, LINK, LIST_ELEMENT, nControlId, PASSWORD, PREVIEW, READONLY, SELECTION, TEMPLATE, TOGGLE_ELEMENT, and VERSION.
Referenced by createControls().
OUString ControlHelper::getLabel | ( | sal_Int16 | nControlId | ) |
Definition at line 262 of file ControlHelper.mm.
References getControl(), m_aMapListLabels, nControlId, and SAL_INFO.
Referenced by SalAquaFilePicker::getLabel().
|
inline |
Definition at line 92 of file ControlHelper.hxx.
References createUserPane(), m_bIsUserPaneLaidOut, and m_pUserPane.
Referenced by SalAquaPicker::run().
uno::Any ControlHelper::getValue | ( | sal_Int16 | nControlId, |
sal_Int16 | nControlAction | ||
) | const |
Definition at line 343 of file ControlHelper.mm.
References getControl(), nControlId, and SAL_INFO.
Referenced by SalAquaFilePicker::getValue().
|
staticprivate |
Definition at line 900 of file ControlHelper.mm.
References Class, first, kAquaSpaceAfterPopupButtonsV, kAquaSpaceBetweenControls, kAquaSpaceBetweenPopupMenus, kAquaSpaceBoxFrameViewDiffBottom, and kAquaSpaceBoxFrameViewDiffTop.
Referenced by layoutControls().
|
inline |
Definition at line 99 of file ControlHelper.hxx.
References m_bToggleVisibility.
|
private |
Definition at line 628 of file ControlHelper.mm.
References aStringList, i, layoutControls(), nPos, and SAL_INFO.
Referenced by setValue().
void ControlHelper::initialize | ( | sal_Int16 | templateId | ) |
Definition at line 180 of file ControlHelper.mm.
References AUTOEXTENSION, createControls(), FILTEROPTIONS, GPGENCRYPTION, IMAGE_ANCHOR, IMAGE_TEMPLATE, LINK, m_bListVisibility, m_bToggleVisibility, PASSWORD, PREVIEW, READONLY, SELECTION, TEMPLATE, and VERSION.
Referenced by SalAquaFilePicker::initialize().
|
inline |
Definition at line 118 of file ControlHelper.hxx.
References AUTOEXTENSION, and m_pToggles.
Referenced by SalAquaFilePicker::updateSaveFileNameExtension().
|
private |
Definition at line 755 of file ControlHelper.mm.
References Class, getVerticalDistance(), kAquaSpaceBetweenControls, kAquaSpaceLabelFrameBoundsDiffH, kAquaSpaceLabelPopupDiffV, kAquaSpacePopupMenuFrameBoundsDiffBottom, kAquaSpacePopupMenuFrameBoundsDiffLeft, kAquaSpacePopupMenuFrameBoundsDiffTop, kAquaSpaceSwitchButtonFrameBoundsDiff, label(), left, m_aActiveControls, m_aMapListLabelFields, m_bIsUserPaneLaidOut, m_pUserPane, and SAL_INFO.
Referenced by createUserPane(), HandleSetListValue(), and setLabel().
|
inline |
Definition at line 114 of file ControlHelper.hxx.
References m_pDelegate.
Referenced by SalAquaFilePicker::SalAquaFilePicker().
|
inline |
Definition at line 103 of file ControlHelper.hxx.
References m_bIsFilterControlNeeded, and m_bUserPaneNeeded.
Referenced by SalAquaFilePicker::appendFilter(), and SalAquaFilePicker::appendFilterGroup().
|
inline |
Definition at line 110 of file ControlHelper.hxx.
References m_pFilterHelper.
Referenced by SalAquaFilePicker::ensureFilterHelper().
void ControlHelper::setLabel | ( | sal_Int16 | nControlId, |
NSString * | aLabel | ||
) |
Definition at line 287 of file ControlHelper.mm.
References aLabel, getControl(), layoutControls(), m_aMapListLabels, nControlId, and SAL_INFO.
Referenced by SalAquaFilePicker::setLabel().
void ControlHelper::setValue | ( | sal_Int16 | nControlId, |
sal_Int16 | nControlAction, | ||
const uno::Any & | rValue | ||
) |
Definition at line 315 of file ControlHelper.mm.
References getControl(), HandleSetListValue(), nControlId, and SAL_INFO.
Referenced by SalAquaFilePicker::setValue().
void ControlHelper::updateFilterUI | ( | ) |
Definition at line 925 of file ControlHelper.mm.
References createFilterControl(), FilterHelper::getCurrentFilterIndex(), index, m_bIsFilterControlNeeded, m_pFilterControl, m_pFilterHelper, and SAL_INFO.
Referenced by SalAquaFilePicker::updateFilterUI().
|
private |
a list with all actively used controls
Definition at line 161 of file ControlHelper.hxx.
Referenced by createControls(), createFilterControl(), createUserPane(), layoutControls(), and ~ControlHelper().
|
private |
a map to store a popup menu's label text field
Definition at line 146 of file ControlHelper.hxx.
Referenced by createUserPane(), layoutControls(), and ~ControlHelper().
|
private |
a map to store a control's label text
Definition at line 143 of file ControlHelper.hxx.
Referenced by createFilterControl(), createUserPane(), getLabel(), setLabel(), and ~ControlHelper().
|
private |
indicates if a filter control is needed
Definition at line 158 of file ControlHelper.hxx.
Referenced by createUserPane(), setFilterControlNeeded(), and updateFilterUI().
|
private |
indicates if the user pane was laid out already
Definition at line 155 of file ControlHelper.hxx.
Referenced by getUserPane(), and layoutControls().
|
private |
the visibility flags for the popup menus
Definition at line 149 of file ControlHelper.hxx.
Referenced by ControlHelper(), createControls(), and initialize().
|
private |
the visibility flags for the checkboxes
Definition at line 134 of file ControlHelper.hxx.
Referenced by ControlHelper(), createControls(), getVisibility(), and initialize().
|
private |
indicates if a user pane is needed
Definition at line 152 of file ControlHelper.hxx.
Referenced by createControls(), createUserPane(), and setFilterControlNeeded().
|
private |
the save or open panel's delegate
Definition at line 167 of file ControlHelper.hxx.
Referenced by createControls(), createFilterControl(), and setFilePickerDelegate().
|
private |
the special filter control
Definition at line 137 of file ControlHelper.hxx.
Referenced by createFilterControl(), createUserPane(), updateFilterUI(), and ~ControlHelper().
|
private |
the filter helper
Definition at line 164 of file ControlHelper.hxx.
Referenced by createFilterControl(), setFilterHelper(), and updateFilterUI().
|
private |
the popup menu controls (except for the filter control)
Definition at line 140 of file ControlHelper.hxx.
Referenced by createControls().
|
private |
the checkbox controls
Definition at line 131 of file ControlHelper.hxx.
Referenced by createControls(), and isAutoExtensionEnabled().
|
private |
the native view object
Definition at line 128 of file ControlHelper.hxx.
Referenced by createUserPane(), getUserPane(), layoutControls(), and ~ControlHelper().