LibreOffice Module fpicker (master) 1
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ControlHelper Class Reference

#include <ControlHelper.hxx>

Collaboration diagram for ControlHelper:
[legend]

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...
 
FilterHelperm_pFilterHelper
 the filter helper More...
 
AquaFilePickerDelegatem_pDelegate
 the save or open panel's delegate More...
 

Detailed Description

Definition at line 37 of file ControlHelper.hxx.

Member Enumeration Documentation

◆ ListType

Enumerator
VERSION 
TEMPLATE 
IMAGE_TEMPLATE 
IMAGE_ANCHOR 
LIST_LAST 

Definition at line 81 of file ControlHelper.hxx.

◆ ToggleType

Enumerator
AUTOEXTENSION 
PASSWORD 
GPGENCRYPTION 
FILTEROPTIONS 
READONLY 
LINK 
PREVIEW 
SELECTION 
TOGGLE_LAST 

Definition at line 69 of file ControlHelper.hxx.

Constructor & Destructor Documentation

◆ ControlHelper()

ControlHelper::ControlHelper ( )

Definition at line 127 of file ControlHelper.mm.

References i, LIST_LAST, m_bListVisibility, m_bToggleVisibility, and TOGGLE_LAST.

◆ ~ControlHelper()

ControlHelper::~ControlHelper ( )
virtual

Member Function Documentation

◆ createControls()

void ControlHelper::createControls ( )
private

◆ createFilterControl()

void ControlHelper::createFilterControl ( )
private

◆ createUserPane()

void ControlHelper::createUserPane ( )
private

◆ enableControl()

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().

◆ getControl()

NSControl * ControlHelper::getControl ( const sal_Int16  nControlId) const
private

◆ getControlElementName()

int ControlHelper::getControlElementName ( const Class  clazz,
const int  nControlId 
)
staticprivate

◆ getLabel()

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().

◆ getUserPane()

NSView * ControlHelper::getUserPane ( )
inline

Definition at line 92 of file ControlHelper.hxx.

References createUserPane(), m_bIsUserPaneLaidOut, and m_pUserPane.

Referenced by SalAquaPicker::run().

◆ getValue()

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().

◆ getVerticalDistance()

int ControlHelper::getVerticalDistance ( const NSControl *  first,
const NSControl *  second 
)
staticprivate

◆ getVisibility()

bool ControlHelper::getVisibility ( ToggleType  tToggle)
inline

Definition at line 99 of file ControlHelper.hxx.

References m_bToggleVisibility.

◆ HandleSetListValue()

void ControlHelper::HandleSetListValue ( const NSControl *  pControl,
const sal_Int16  nControlAction,
const uno::Any rValue 
)
private

Definition at line 628 of file ControlHelper.mm.

References aStringList, i, layoutControls(), nPos, and SAL_INFO.

Referenced by setValue().

◆ initialize()

void ControlHelper::initialize ( sal_Int16  templateId)

◆ isAutoExtensionEnabled()

bool ControlHelper::isAutoExtensionEnabled ( )
inline

Definition at line 118 of file ControlHelper.hxx.

References AUTOEXTENSION, and m_pToggles.

Referenced by SalAquaFilePicker::updateSaveFileNameExtension().

◆ layoutControls()

void ControlHelper::layoutControls ( )
private

◆ setFilePickerDelegate()

void ControlHelper::setFilePickerDelegate ( AquaFilePickerDelegate pDelegate)
inline

Definition at line 114 of file ControlHelper.hxx.

References m_pDelegate.

Referenced by SalAquaFilePicker::SalAquaFilePicker().

◆ setFilterControlNeeded()

void ControlHelper::setFilterControlNeeded ( bool  bNeeded)
inline

◆ setFilterHelper()

void ControlHelper::setFilterHelper ( FilterHelper pFilterHelper)
inline

Definition at line 110 of file ControlHelper.hxx.

References m_pFilterHelper.

Referenced by SalAquaFilePicker::ensureFilterHelper().

◆ setLabel()

void ControlHelper::setLabel ( sal_Int16  nControlId,
NSString *  aLabel 
)

◆ setValue()

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().

◆ updateFilterUI()

void ControlHelper::updateFilterUI ( )

Member Data Documentation

◆ m_aActiveControls

::std::list<NSControl*> ControlHelper::m_aActiveControls
private

a list with all actively used controls

Definition at line 161 of file ControlHelper.hxx.

Referenced by createControls(), createFilterControl(), createUserPane(), layoutControls(), and ~ControlHelper().

◆ m_aMapListLabelFields

::std::map<NSPopUpButton *, NSTextField *> ControlHelper::m_aMapListLabelFields
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().

◆ m_aMapListLabels

::std::map<NSControl *, NSString *> ControlHelper::m_aMapListLabels
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().

◆ m_bIsFilterControlNeeded

bool ControlHelper::m_bIsFilterControlNeeded
private

indicates if a filter control is needed

Definition at line 158 of file ControlHelper.hxx.

Referenced by createUserPane(), setFilterControlNeeded(), and updateFilterUI().

◆ m_bIsUserPaneLaidOut

bool ControlHelper::m_bIsUserPaneLaidOut
private

indicates if the user pane was laid out already

Definition at line 155 of file ControlHelper.hxx.

Referenced by getUserPane(), and layoutControls().

◆ m_bListVisibility

bool ControlHelper::m_bListVisibility[LIST_LAST]
private

the visibility flags for the popup menus

Definition at line 149 of file ControlHelper.hxx.

Referenced by ControlHelper(), createControls(), and initialize().

◆ m_bToggleVisibility

bool ControlHelper::m_bToggleVisibility[TOGGLE_LAST]
private

the visibility flags for the checkboxes

Definition at line 134 of file ControlHelper.hxx.

Referenced by ControlHelper(), createControls(), getVisibility(), and initialize().

◆ m_bUserPaneNeeded

bool ControlHelper::m_bUserPaneNeeded
private

indicates if a user pane is needed

Definition at line 152 of file ControlHelper.hxx.

Referenced by createControls(), createUserPane(), and setFilterControlNeeded().

◆ m_pDelegate

AquaFilePickerDelegate* ControlHelper::m_pDelegate
private

the save or open panel's delegate

Definition at line 167 of file ControlHelper.hxx.

Referenced by createControls(), createFilterControl(), and setFilePickerDelegate().

◆ m_pFilterControl

NSPopUpButton* ControlHelper::m_pFilterControl
private

the special filter control

Definition at line 137 of file ControlHelper.hxx.

Referenced by createFilterControl(), createUserPane(), updateFilterUI(), and ~ControlHelper().

◆ m_pFilterHelper

FilterHelper* ControlHelper::m_pFilterHelper
private

the filter helper

Definition at line 164 of file ControlHelper.hxx.

Referenced by createFilterControl(), setFilterHelper(), and updateFilterUI().

◆ m_pListControls

NSControl* ControlHelper::m_pListControls[LIST_LAST]
private

the popup menu controls (except for the filter control)

Definition at line 140 of file ControlHelper.hxx.

Referenced by createControls().

◆ m_pToggles

NSControl* ControlHelper::m_pToggles[TOGGLE_LAST]
private

the checkbox controls

Definition at line 131 of file ControlHelper.hxx.

Referenced by createControls(), and isAutoExtensionEnabled().

◆ m_pUserPane

NSView* ControlHelper::m_pUserPane
private

the native view object

Definition at line 128 of file ControlHelper.hxx.

Referenced by createUserPane(), getUserPane(), layoutControls(), and ~ControlHelper().


The documentation for this class was generated from the following files: