#include <FXIconDict.h>
Public Member Functions | |
FXIconDict (FXApp *app, const FXString &p=defaultIconPath) | |
void | setIconSource (FXIconSource *src) |
FXIconSource * | getIconSource () const |
void | setIconPath (const FXString &p) |
const FXString & | getIconPath () const |
FXIcon * | insert (const FXchar *name) |
FXIcon * | remove (const FXchar *name) |
FXIcon * | find (const FXchar *name) |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXIconDict () |
void | size (FXint m) |
FXint | size () const |
FXint | no () const |
void * | insert (const FXchar *ky, const void *ptr, bool mrk=false) |
void * | replace (const FXchar *ky, const void *ptr, bool mrk=false) |
void * | find (const FXchar *ky) const |
bool | empty (FXint pos) const |
const FXchar * | key (FXuint pos) const |
void * | data (FXuint pos) const |
bool | mark (FXuint pos) const |
FXint | first () const |
FXint | last () const |
FXint | next (FXint pos) const |
FXint | prev (FXint pos) const |
void | clear () |
virtual long | onDefault (FXObject *, FXSelector, void *) |
const FXchar * | getClassName () const |
bool | isMemberOf (const FXMetaClass *metaclass) const |
virtual long | tryHandle (FXObject *sender, FXSelector sel, void *ptr) |
QTransString | tr (const char *text, const char *hint=0) |
virtual void * | getPythonObject () const |
virtual void | decouplePythonObject () const |
Static Public Attributes | |
static const FXchar | defaultIconPath [] |
Protected Member Functions | |
virtual void * | createData (const void *) |
virtual void | deleteData (void *) |
Static Protected Member Functions | |
static FXint | hash (const FXchar *str) |
Protected Attributes | |
FXDictEntry * | dict |
FXint | total |
FXint | number |
FX::FXIconDict::FXIconDict | ( | FXApp * | app, | |
const FXString & | p = defaultIconPath | |||
) |
Construct icon dictionary, and set initial search path; also creates a default icon source object.
virtual FX::FXIconDict::~FXIconDict | ( | ) | [virtual] |
Destroy the icon dict as well as the icon source.
virtual void* FX::FXIconDict::createData | ( | const void * | ) | [protected, virtual] |
Overload this function in a derived class to return the data pointer given an input pointer; the default implementation just returns the input pointer.
Reimplemented from FX::FXDict.
virtual void FX::FXIconDict::deleteData | ( | void * | ) | [protected, virtual] |
Overload this function in a derived class to delete the pointer previously returned by createData(); the default implementation does nothing.
Reimplemented from FX::FXDict.
void FX::FXIconDict::setIconSource | ( | FXIconSource * | src | ) | [inline] |
Change icon source.
FXIconSource* FX::FXIconDict::getIconSource | ( | ) | const [inline] |
Return icon source.
void FX::FXIconDict::setIconPath | ( | const FXString & | p | ) | [inline] |
Set icon search path.
const FXString& FX::FXIconDict::getIconPath | ( | ) | const [inline] |
Return current icon search path.
FXIcon* FX::FXIconDict::insert | ( | const FXchar * | name | ) | [inline] |
FXIcon* FX::FXIconDict::remove | ( | const FXchar * | name | ) | [inline] |
FXIcon* FX::FXIconDict::find | ( | const FXchar * | name | ) | [inline] |
virtual void FX::FXIconDict::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXIconDict::load | ( | FXStream & | store | ) | [virtual] |
void FX::FXDict::size | ( | FXint | m | ) | [inherited] |
Resize the table to the given size.
FXint FX::FXDict::size | ( | ) | const [inline, inherited] |
Return the size of the table, including the empty slots.
FXint FX::FXDict::no | ( | ) | const [inline, inherited] |
Return the total number of entries in the table.
void* FX::FXDict::insert | ( | const FXchar * | ky, | |
const void * | ptr, | |||
bool | mrk = false | |||
) | [inherited] |
Insert a new entry into the table given key and mark. If there is already an entry with that key, leave it unchanged, otherwise insert the new entry.
Referenced by FX::FXStringDict::insert(), and insert().
void* FX::FXDict::replace | ( | const FXchar * | ky, | |
const void * | ptr, | |||
bool | mrk = false | |||
) | [inherited] |
Replace data at key, if the entry's mark is less than or equal to the given mark. If there was no existing entry, a new entry is inserted with the given mark.
Referenced by FX::FXStringDict::replace().
void* FX::FXDict::find | ( | const FXchar * | ky | ) | const [inherited] |
Find data pointer given key.
Reimplemented in FX::FXSettings, and FX::FXStringDict.
Referenced by FX::FXStringDict::find(), FX::FXSettings::find(), and find().
bool FX::FXDict::empty | ( | FXint | pos | ) | const [inline, inherited] |
Return true if slot is empty.
const FXchar* FX::FXDict::key | ( | FXuint | pos | ) | const [inline, inherited] |
Return key at position pos.
void* FX::FXDict::data | ( | FXuint | pos | ) | const [inline, inherited] |
return data pointer at position pos.
Reimplemented in FX::FXSettings, and FX::FXStringDict.
Referenced by FX::FXSettings::data().
bool FX::FXDict::mark | ( | FXuint | pos | ) | const [inline, inherited] |
Return mark flag of entry at position pos.
FXint FX::FXDict::first | ( | ) | const [inherited] |
Return position of first filled slot, or >= total
FXint FX::FXDict::last | ( | ) | const [inherited] |
Return position of last filled slot or -1
FXint FX::FXDict::next | ( | FXint | pos | ) | const [inherited] |
Return position of next filled slot in hash table or a value greater than or equal to total if no filled slot was found
FXint FX::FXDict::prev | ( | FXint | pos | ) | const [inherited] |
Return position of previous filled slot in hash table or a -1 if no filled slot was found
void FX::FXDict::clear | ( | ) | [inherited] |
virtual long FX::FXObject::onDefault | ( | FXObject * | , | |
FXSelector | , | |||
void * | ||||
) | [virtual, inherited] |
Called for unhandled messages.
Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.
const FXchar* FX::FXObject::getClassName | ( | ) | const [inherited] |
Get class name of some object.
bool FX::FXObject::isMemberOf | ( | const FXMetaClass * | metaclass | ) | const [inherited] |
Check if object is member of metaclass.
virtual long FX::FXObject::tryHandle | ( | FXObject * | sender, | |
FXSelector | sel, | |||
void * | ptr | |||
) | [virtual, inherited] |
Try handle message safely.
QTransString FX::FXObject::tr | ( | const char * | text, | |
const char * | hint = 0 | |||
) | [inherited] |
Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)
virtual void* FX::FXObject::getPythonObject | ( | ) | const [inline, virtual, inherited] |
Returns the python object representing this instance (if created in python).
virtual void FX::FXObject::decouplePythonObject | ( | ) | const [inline, virtual, inherited] |
Causes decoupling of python object from this object (deletes self).
const FXchar FX::FXIconDict::defaultIconPath[] [static] |
Default icon search path.