MGUI::DLG_GETOBJECT_FILTER Class Reference
Filter to determine if objects and files are allowed for selection.
More...
#include <mgui/dlggetobjectfilter.h>
List of all members.
Public Member Functions |
| | DLG_GETOBJECT_FILTER (const RVC::OBJTYPESET &ObjTypeSetSelectable, const RVC::OBJTYPESET &ObjTypeSetValidParent) |
| | DLG_GETOBJECT_FILTER (const RVC::OBJTYPESET &ObjTypeSetSelectable) |
| | DLG_GETOBJECT_FILTER (const MISTRING &extns) |
| | DLG_GETOBJECT_FILTER (const char *extns) |
| | DLG_GETOBJECT_FILTER () |
| virtual | ~DLG_GETOBJECT_FILTER () |
| void | AddDelegateIsFileSelectable (DELEGATE_FILTER_FILEPATH delegate) |
| void | AddDelegateIsFolderBrowsable (DELEGATE_FILTER_FILEPATH delegate) |
| void | AddDelegateIsFolderSelectable (DELEGATE_FILTER_FILEPATH delegate) |
| void | AddDelegateIsFolderValidParent (DELEGATE_FILTER_FILEPATH delegate) |
| void | AddDelegateIsListValid (DELEGATE_FILTER_OBJITEMLIST delegate) |
| void | AddDelegateIsObjectBrowsable (DELEGATE_FILTER_OBJITEM delegate) |
| void | AddDelegateIsObjectSelectable (DELEGATE_FILTER_OBJITEM delegate, bool inclusive=true) |
| void | AddDelegateIsObjectValidParent (DELEGATE_FILTER_OBJITEM delegate) |
| void | AddFileType (const FILETYPE &filetype) |
| void | AddFileTypes (const MISTRING &extn) |
| void | AddFileTypes (const char *extn) |
| void | AddObjTypeSelectable (RVC::OBJTYPE ObjTypeSelectable) |
| void | AddObjTypeSetSelectable (const RVC::OBJTYPESET &ObjTypeSetSelectable) |
| void | Clear () const |
| bool | GetAllowAllFileExtns () const |
| bool | GetAllowAllObjTypes () const |
| ERRVALUE | GetErrValue () const |
| const FILETYPESET & | GetFileTypeSet () const |
| MISTRING | GetMessage (TEXTID TextID=TEXTID__None) const |
| const RVC::OBJTYPESET & | GetObjTypeSetSelectable () const |
| const RVC::OBJTYPESET & | GetObjTypeSetValidParent () const |
| bool | IsFileSelectable (const FILEPATH &filepath, int position=-1, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| bool | IsFolderBrowsable (const FILEPATH &filepath, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| bool | IsFolderSelectable (const FILEPATH &filepath, int position=-1, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| bool | IsFolderValidParent (const FILEPATH &filepath, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| bool | IsListValid (const RVC::OBJITEMLIST &objlist, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| bool | IsObjectBrowsable (const RVC::OBJITEM &objitem, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| bool | IsObjectSelectable (const RVC::OBJITEM &objitem, int position=-1, DLG_GETOBJECT_FILTER *pFilterProxyFor=0, bool bIgnoreDelegates=false) const |
| bool | IsObjectValidParent (const RVC::OBJITEM &parent, DLG_GETOBJECT_FILTER *pFilterProxyFor=0) const |
| void | SetAllowAllFileExtns (bool allow=true) |
| void | SetAllowBrowseIfHasSelectableChild (bool allow=true) const |
| void | SetErrValue (ERRVALUE err) const |
| void | SetMessage (const MISTRING &message) const |
Private Member Functions |
| virtual bool | v_IsFileSelectable (const FILEPATH &filepath, int position) const |
| virtual bool | v_IsFolderBrowsable (const FILEPATH &filepath) const |
| virtual bool | v_IsFolderSelectable (const FILEPATH &filepath, int position) const |
| virtual bool | v_IsFolderValidParent (const FILEPATH &filepath) const |
| virtual bool | v_IsListValid (const RVC::OBJITEMLIST &objlist) const |
| virtual bool | v_IsObjectBrowsable (const RVC::OBJITEM &objitem) const |
| virtual bool | v_IsObjectSelectable (const RVC::OBJITEM &objitem, int position) const |
| virtual bool | v_IsObjectValidParent (const RVC::OBJITEM &parent) const |
Detailed Description
Filter to determine if objects and files are allowed for selection.
Constructor & Destructor Documentation
| MGUI::DLG_GETOBJECT_FILTER::DLG_GETOBJECT_FILTER |
( |
|
) |
|
| MGUI::DLG_GETOBJECT_FILTER::DLG_GETOBJECT_FILTER |
( |
const char * |
extns |
) |
|
Implicit constructor using char* file extensions for general file selection.
- Parameters:
-
| extns | Extensions without wildcard (*) or period (.), may use "*" for all, separate multiple by space or comma, eg "txt,htm" |
| MGUI::DLG_GETOBJECT_FILTER::DLG_GETOBJECT_FILTER |
( |
const MISTRING & |
extns |
) |
|
Implicit constructor using MISTRING file extensions for general file selection.
- Parameters:
-
| extns | Extensions without wildcard (*) or period (.), separated by space or comma |
| MGUI::DLG_GETOBJECT_FILTER::DLG_GETOBJECT_FILTER |
( |
const RVC::OBJTYPESET & |
ObjTypeSetSelectable |
) |
|
Construct with selectable and valid parent object type sets.
Use of this constructor implies allowing browsing if is valid parent.
| virtual MGUI::DLG_GETOBJECT_FILTER::~DLG_GETOBJECT_FILTER |
( |
|
) |
[virtual] |
Member Function Documentation
Add delegate to determine if general file is selectable.
If multiple delegates are added the file is considered selectable if v_IsFileSelectable or ANY of the delegates returns true.
Add delegate to determine if folder is browsable.
If multiple delegates are added the folder is considered browsable v_IsFolderBrowsable and ALL of the delegates returns true.
Add delegate to determine if folder is selectable.
If multiple delegates are added the folder is considered selectable if v_IsFolderSelectable or ANY of the delegates returns true.
Add delegate to determine if folder is valid as parent for New File.
If multiple delegates are added the folder is considered valid if v_IsFolderValidParent and ALL of the delegates returns true.
Add delegate to determine if list is valid.
The list is only considered valid if v_IsListValid and ALL of the delegates returns true.
Add delegate to determine if object is browsable (ie.
has selectable child object). The object is considered browsable if v_IsObjectBrowsable or ANY of the delegates returns true.
| void MGUI::DLG_GETOBJECT_FILTER::AddDelegateIsObjectSelectable |
( |
DELEGATE_FILTER_OBJITEM |
delegate, |
|
|
bool |
inclusive = true | |
|
) |
| | |
Add delegate to determine if object is selectable.
The object is considered selectable if ALL "exclusive" delegates return true and ANY "inclusive" delegate returns true. If no delegate of a particular type is added that check will not be done.
- Parameters:
-
| inclusive | True if "inclusive", false if "exclusive" |
Add delegate to determine if object is valid as a parent for a New Object.
The object is only considered valid if v_IsObjectValidParent and ALL of the delegates returns true.
| void MGUI::DLG_GETOBJECT_FILTER::AddFileType |
( |
const FILETYPE & |
filetype |
) |
|
Add file type for general file selection.
- Parameters:
-
| filetype | File type definition |
| void MGUI::DLG_GETOBJECT_FILTER::AddFileTypes |
( |
const MISTRING & |
extn |
) |
|
Add MISTRING file extension(s) for general file selection.
Will lookup extension(s) in registered common file type set to determine description, icon etc.
- Parameters:
-
| extn | File extension (case-insensitive), do not use "." |
| void MGUI::DLG_GETOBJECT_FILTER::AddFileTypes |
( |
const char * |
extn |
) |
|
Add char* file extension(s) for general file selection.
Will lookup extension(s) in registered common file type set to determine description, icon etc.
- Parameters:
-
| extn | Single file extension (case-insensitive), do not use ".", may use "*" for all. |
| void MGUI::DLG_GETOBJECT_FILTER::AddObjTypeSelectable |
( |
RVC::OBJTYPE |
ObjTypeSelectable |
) |
|
Add selectable object type.
| void MGUI::DLG_GETOBJECT_FILTER::AddObjTypeSetSelectable |
( |
const RVC::OBJTYPESET & |
ObjTypeSetSelectable |
) |
|
Add selectable object type set.
| void MGUI::DLG_GETOBJECT_FILTER::Clear |
( |
|
) |
const [inline] |
Clear current message and error value settings.
| bool MGUI::DLG_GETOBJECT_FILTER::GetAllowAllFileExtns |
( |
|
) |
const [inline] |
Get whether to allow all file extensions.
| bool MGUI::DLG_GETOBJECT_FILTER::GetAllowAllObjTypes |
( |
|
) |
const [inline] |
Determine if allowing all object types.
| ERRVALUE MGUI::DLG_GETOBJECT_FILTER::GetErrValue |
( |
|
) |
const [inline] |
| const FILETYPESET& MGUI::DLG_GETOBJECT_FILTER::GetFileTypeSet |
( |
|
) |
const [inline] |
Get set of allowed file types.
| MISTRING MGUI::DLG_GETOBJECT_FILTER::GetMessage |
( |
TEXTID |
TextID = TEXTID__None |
) |
const |
Get message based on stored error value or message string.
Error value takes precedence over any message set.
- Parameters:
-
| TextID | Text ID to use for message if none previously set |
| const RVC::OBJTYPESET& MGUI::DLG_GETOBJECT_FILTER::GetObjTypeSetSelectable |
( |
|
) |
const [inline] |
Get set of selectable object types.
| const RVC::OBJTYPESET& MGUI::DLG_GETOBJECT_FILTER::GetObjTypeSetValidParent |
( |
|
) |
const [inline] |
Get set of valid parent object types.
| bool MGUI::DLG_GETOBJECT_FILTER::IsFileSelectable |
( |
const FILEPATH & |
filepath, |
|
|
int |
position = -1, |
|
|
DLG_GETOBJECT_FILTER * |
pFilterProxyFor = 0 | |
|
) |
| | const |
Determine if general file is selectable.
- Returns:
- 'true' if selectable, 'false' if not. Calls v_IsFileSelectable(). If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| filepath | Path to file |
| position | Position of the object in the set for DLG_GETOBJECT_SET. |
| pFilterProxyFor | Filter this is a proxy for |
Determine if folder is browsable.
- Returns:
- 'true' if browsable, 'false' if not. Calls v_IsFolderBrowsable() and delegates added via AddDelegateIsFolderBrowsable. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| filepath | Path to folder |
| pFilterProxyFor | Filter this is a proxy for |
| bool MGUI::DLG_GETOBJECT_FILTER::IsFolderSelectable |
( |
const FILEPATH & |
filepath, |
|
|
int |
position = -1, |
|
|
DLG_GETOBJECT_FILTER * |
pFilterProxyFor = 0 | |
|
) |
| | const |
Determine if folder is selectable.
- Returns:
- 'true' if selectable, 'false' if not. Calls v_IsFolderSelectable() and delegates added via AddDelegateIsFolderSelectable. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| filepath | Path to folder |
| position | Position of the object in the set for DLG_GETOBJECT_SET. |
| pFilterProxyFor | Filter this is a proxy for |
Determine if New File should be enabled.
- Returns:
- 'true' if valid, 'false' if not. Calls v_IsFolderValidParent() and delegates added via AddDelegateIsFolderValidParent. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| filepath | Path to folder |
| pFilterProxyFor | Filter this is a proxy for |
Determine if list of objects is valid and usable together.
- Returns:
- 'true' if list is valid, 'false' if not. Calls v_IsListValid which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| objlist | Object list to check |
| pFilterProxyFor | Filter this is a proxy for |
Determine can browse "into" object (ie.
has selectable child object). Calls v_IsObjectBrowsable which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| objitem | Object to check |
| pFilterProxyFor | Filter this is a proxy for |
| bool MGUI::DLG_GETOBJECT_FILTER::IsObjectSelectable |
( |
const RVC::OBJITEM & |
objitem, |
|
|
int |
position = -1, |
|
|
DLG_GETOBJECT_FILTER * |
pFilterProxyFor = 0, |
|
|
bool |
bIgnoreDelegates = false | |
|
) |
| | const |
Determine if object is selectable.
- Returns:
- 'true' if selectable, 'false' if not. Calls v_IsObjectSelectable() which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| objitem | Object to check |
| position | Position of the object in the set for DLG_GETOBJECT_SET. |
| pFilterProxyFor | Filter this is a proxy for |
| bIgnoreDelegates | Set true to ignore overrides and delegates |
Determine if the "New Object" button should be enabled.
- Returns:
- 'true' if parent is valid parent for creating object under. Returns false if file is read-only. Returns false if object type not in set of allowed parent object types. Calls v_IsObjectValidParent which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
- Parameters:
-
| parent | Parent object item |
| pFilterProxyFor | Filter this is a proxy for |
| void MGUI::DLG_GETOBJECT_FILTER::SetAllowAllFileExtns |
( |
bool |
allow = true |
) |
[inline] |
Set whether to allow all file extensions.
| void MGUI::DLG_GETOBJECT_FILTER::SetAllowBrowseIfHasSelectableChild |
( |
bool |
allow = true |
) |
const [inline] |
Set whether isObjectBrowsable should check for selectable child/descendent.
| void MGUI::DLG_GETOBJECT_FILTER::SetErrValue |
( |
ERRVALUE |
err |
) |
const [inline] |
| void MGUI::DLG_GETOBJECT_FILTER::SetMessage |
( |
const MISTRING & |
message |
) |
const [inline] |
Set the current message for this filter.
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsFileSelectable |
( |
const FILEPATH & |
filepath, |
|
|
int |
position | |
|
) |
| | const [private, virtual] |
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsFolderBrowsable |
( |
const FILEPATH & |
filepath |
) |
const [private, virtual] |
Called by IsFolderBrowsable() to determine if folder is browsable.
- Returns:
- 'true' if browsable, 'false' if not. Default implementation always returns 'true'.
- Parameters:
-
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsFolderSelectable |
( |
const FILEPATH & |
filepath, |
|
|
int |
position | |
|
) |
| | const [private, virtual] |
Called by IsFolderSelectable() to determine if folder is selectable.
- Returns:
- 'true' if selectable, 'false' if not. Default implementation always returns 'false'.
- Parameters:
-
| filepath | Folder to check |
| position | Position of the file in the set for DLG_GETOBJECT_SET. |
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsFolderValidParent |
( |
const FILEPATH & |
filepath |
) |
const [private, virtual] |
Called by IsFolderValidParent() to determine if folder is valid for New File.
- Returns:
- 'true' if browsable, 'false' if not. Default implementation always returns 'true'.
- Parameters:
-
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsListValid |
( |
const RVC::OBJITEMLIST & |
objlist |
) |
const [private, virtual] |
Called by IsListValid() to determine if list of objects is valid and usable together.
- Returns:
- 'true' if list is valid, 'false' if not. Default implementation always returns 'true'.
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsObjectBrowsable |
( |
const RVC::OBJITEM & |
objitem |
) |
const [private, virtual] |
Called by IsObjectBrowsable() to determine if has selectable child objects.
Default implementation always returns 'false'.
- Parameters:
-
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsObjectSelectable |
( |
const RVC::OBJITEM & |
objitem, |
|
|
int |
position | |
|
) |
| | const [private, virtual] |
Called by IsObjectSelectable() to determine if object is selectable.
- Returns:
- 'true' if selectable, 'false' if not. Default implementation always returns 'true'.
- Parameters:
-
| objitem | Object to check |
| position | Position of the object in the set for DLG_GETOBJECT_SET. |
| virtual bool MGUI::DLG_GETOBJECT_FILTER::v_IsObjectValidParent |
( |
const RVC::OBJITEM & |
parent |
) |
const [private, virtual] |
Called by IsObjectValidParent() to determine if "New Object" should be enabled.
- Returns:
- 'true' if parent is valid parent for creating object under. Default implementation always returns 'true'.
The documentation for this class was generated from the following file: