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,
  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 38 of file ControlHelper.hxx.

Member Enumeration Documentation

Enumerator
VERSION 
TEMPLATE 
IMAGE_TEMPLATE 
IMAGE_ANCHOR 
LIST_LAST 

Definition at line 81 of file ControlHelper.hxx.

Enumerator
AUTOEXTENSION 
PASSWORD 
FILTEROPTIONS 
READONLY 
LINK 
PREVIEW 
SELECTION 
TOGGLE_LAST 

Definition at line 70 of file ControlHelper.hxx.

Constructor & Destructor Documentation

ControlHelper::ControlHelper ( )

Definition at line 129 of file ControlHelper.mm.

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

ControlHelper::~ControlHelper ( )
virtual

Member Function Documentation

void ControlHelper::createControls ( )
private
void ControlHelper::createFilterControl ( )
private
void ControlHelper::createUserPane ( )
private
void ControlHelper::enableControl ( sal_Int16  nControlId,
bool  bEnable 
) const

Definition at line 239 of file ControlHelper.mm.

References getControl(), and SAL_INFO.

Referenced by SalAquaFilePicker::enableControl().

NSControl * ControlHelper::getControl ( const sal_Int16  nControlId) const
private
int ControlHelper::getControlElementName ( const Class  clazz,
const int  nControlId 
)
staticprivate
OUString ControlHelper::getLabel ( sal_Int16  nControlId)
NSView* ControlHelper::getUserPane ( )
inline

Definition at line 92 of file ControlHelper.hxx.

Referenced by SalAquaPicker::run().

uno::Any ControlHelper::getValue ( sal_Int16  nControlId,
sal_Int16  nControlAction 
) const

Definition at line 347 of file ControlHelper.mm.

References getControl(), and SAL_INFO.

Referenced by SalAquaFilePicker::getValue().

int ControlHelper::getVerticalDistance ( const NSControl *  first,
const NSControl *  second 
)
staticprivate
bool ControlHelper::getVisibility ( ToggleType  tToggle)
inline

Definition at line 99 of file ControlHelper.hxx.

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

Definition at line 631 of file ControlHelper.mm.

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

Referenced by setValue().

void ControlHelper::initialize ( sal_Int16  templateId)

Definition at line 182 of file ControlHelper.mm.

References createControls(), m_bListVisibility, and m_bToggleVisibility.

Referenced by SalAquaFilePicker::initialize().

bool ControlHelper::isAutoExtensionEnabled ( )
inline

Definition at line 118 of file ControlHelper.hxx.

Referenced by SalAquaFilePicker::updateSaveFileNameExtension().

void ControlHelper::layoutControls ( )
private
void ControlHelper::setFilePickerDelegate ( AquaFilePickerDelegate pDelegate)
inline

Definition at line 114 of file ControlHelper.hxx.

Referenced by SalAquaFilePicker::SalAquaFilePicker().

void ControlHelper::setFilterControlNeeded ( bool  bNeeded)
inline
void ControlHelper::setFilterHelper ( FilterHelper pFilterHelper)
inline

Definition at line 110 of file ControlHelper.hxx.

Referenced by SalAquaFilePicker::ensureFilterHelper().

void ControlHelper::setLabel ( sal_Int16  nControlId,
NSString *  aLabel 
)
void ControlHelper::setValue ( sal_Int16  nControlId,
sal_Int16  nControlAction,
const uno::Any rValue 
)

Definition at line 319 of file ControlHelper.mm.

References getControl(), HandleSetListValue(), and SAL_INFO.

Referenced by SalAquaFilePicker::setValue().

void ControlHelper::updateFilterUI ( )

Member Data Documentation

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

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

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

bool ControlHelper::m_bIsFilterControlNeeded
private

indicates if a filter control is needed

Definition at line 158 of file ControlHelper.hxx.

Referenced by createUserPane(), and updateFilterUI().

bool ControlHelper::m_bIsUserPaneLaidOut
private

indicates if the user pane was laid out already

Definition at line 155 of file ControlHelper.hxx.

Referenced by layoutControls().

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

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(), and initialize().

bool ControlHelper::m_bUserPaneNeeded
private

indicates if a user pane is needed

Definition at line 152 of file ControlHelper.hxx.

Referenced by createControls(), and createUserPane().

AquaFilePickerDelegate* ControlHelper::m_pDelegate
private

the save or open panel's delegate

Definition at line 167 of file ControlHelper.hxx.

NSPopUpButton* ControlHelper::m_pFilterControl
private

the special filter control

Definition at line 137 of file ControlHelper.hxx.

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

FilterHelper* ControlHelper::m_pFilterHelper
private

the filter helper

Definition at line 164 of file ControlHelper.hxx.

Referenced by createFilterControl(), and updateFilterUI().

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

NSControl* ControlHelper::m_pToggles[TOGGLE_LAST]
private

the checkbox controls

Definition at line 131 of file ControlHelper.hxx.

Referenced by createControls().

NSView* ControlHelper::m_pUserPane
private

the native view object

Definition at line 128 of file ControlHelper.hxx.

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


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