#include <CSIcon.h>
Inheritance diagram for CSPictureIcon:
Public Member Functions | |
virtual std::string | getType () |
virtual | ~CSPictureIcon () |
bool | initIcon (std::string enabledPictureFile, std::string disabledPictureFile) |
bool | initIcon (CSPicture *picture) |
virtual void | paint (SDL_Surface *destination, SDL_Rect *parentViewport) |
virtual void | layoutSetup () |
Static Public Member Functions | |
CSPictureIcon * | buildIcon (std::string enabledPictureFile, std::string disabledPictureFile) |
CSPictureIcon * | buildIcon (CSPicture *picture) |
CSPictureIcon * | buildIcon (std::string enabledPictureFile) |
Static Public Attributes | |
const char * | CLASS = "CSPictureIcon" |
static element, name of this class (introsepection) | |
Protected Member Functions | |
CSPictureIcon () | |
void | layoutSetupPictureIcon () |
|
Definition at line 69 of file CSIcon.h. References ICON_KIND_PICTURE. Referenced by buildIcon().
00069 : CSIcon(ICON_KIND_PICTURE){} |
|
Definition at line 14 of file CSIcon.cpp. References LOG_ENTER, and LOG_EXIT.
|
|
Definition at line 83 of file CSIcon.cpp. References CSPicture::getHeight(), and CSPicture::getWidth(). Referenced by layoutSetup().
|
Here is the call graph for this function:
|
Reimplemented from CSIcon. Definition at line 74 of file CSIcon.h. References CLASS.
00074 {return (std::string) CLASS;} |
|
Definition at line 75 of file CSIcon.h. References CSPictureIcon(), initIcon(), and CSGrafikElement::layoutChanged(). Referenced by HTMLElement::buildDisplay(), and CSLAF::getIconInternal().
00076 { 00077 CSPictureIcon* icon = 0; 00078 try 00079 { 00080 icon = new CSPictureIcon(); 00081 if (!icon->initIcon(enabledPictureFile, disabledPictureFile)) 00082 { 00083 delete(icon); 00084 icon = 0; 00085 } 00086 } 00087 catch (...) {} 00088 icon->layoutChanged(); 00089 return icon; 00090 } |
Here is the call graph for this function:
|
Definition at line 91 of file CSIcon.h. References CSPictureIcon(), initIcon(), and CSGrafikElement::layoutChanged().
00092 { 00093 CSPictureIcon* icon = 0; 00094 try 00095 { 00096 icon = new CSPictureIcon(); 00097 if (!icon->initIcon(picture)) 00098 { 00099 delete(icon); 00100 icon = 0; 00101 } 00102 } 00103 catch (...) {} 00104 icon->layoutChanged(); 00105 return icon; 00106 } |
Here is the call graph for this function:
|
Definition at line 108 of file CSIcon.h. References CSPictureIcon(), initIcon(), and CSGrafikElement::layoutChanged().
00109 { 00110 CSPictureIcon* icon = 0; 00111 try 00112 { 00113 icon = new CSPictureIcon(); 00114 if (!icon->initIcon(enabledPictureFile, enabledPictureFile)) 00115 { 00116 delete(icon); 00117 icon = 0; 00118 } 00119 } 00120 catch (...) {} 00121 icon->layoutChanged(); 00122 return icon; 00123 } |
Here is the call graph for this function:
|
Definition at line 42 of file CSIcon.cpp. References CSPicture::getHeight(), CSPicture::getWidth(), CSGrafikElement::init(), Loadable< CSPicture >::load(), LOG_ENTER, and LOG_EXIT. Referenced by buildIcon().
00043 { 00044 static char *functionName="initIcon"; 00045 LOG_ENTER 00046 mEnabledPicture = CSPictureLoader::INSTANCE.load(enabledPictureFile); 00047 mDisabledPicture = CSPictureLoader::INSTANCE.load(disabledPictureFile); 00048 if (mEnabledPicture && mDisabledPicture) 00049 { 00050 if ((mEnabledPicture->getHeight() != mDisabledPicture->getHeight()) || (mEnabledPicture->getWidth() != mDisabledPicture->getWidth())) 00051 { 00052 LOG_EXIT 00053 return false; 00054 } 00055 init(mEnabledPicture->getHeight(), mEnabledPicture->getWidth()); 00056 } 00057 else 00058 { 00059 LOG_EXIT 00060 return false; 00061 } 00062 LOG_EXIT 00063 return true; 00064 } |
Here is the call graph for this function:
|
Definition at line 23 of file CSIcon.cpp. References CSGrafikElement::init(), LOG_ENTER, and LOG_EXIT.
00024 { 00025 static char *functionName="initIcon"; 00026 LOG_ENTER 00027 mEnabledPicture = picture; 00028 mDisabledPicture = picture; 00029 if (mEnabledPicture && mDisabledPicture) 00030 { 00031 init(mEnabledPicture->getMaxY(), mEnabledPicture->getMaxX()); 00032 } 00033 else 00034 { 00035 LOG_EXIT 00036 return false; 00037 } 00038 LOG_EXIT 00039 return true; 00040 } |
Here is the call graph for this function:
|
Implements CSIcon. Definition at line 67 of file CSIcon.cpp. References CSPicture::display(), CSGrafikElement::getElementArea(), CSIcon::getState(), ICON_STATE_DISABLED, ICON_STATE_ENABLED, and CSGrafikElement::setEnabled().
00068 { 00069 static char *functionName="paint"; 00070 int state = getState(); 00071 if (state == ICON_STATE_ENABLED) 00072 { 00073 setEnabled(true); 00074 mEnabledPicture->display(getElementArea().x + parentViewport->x, getElementArea().y + parentViewport->y); 00075 } 00076 if (state == ICON_STATE_DISABLED) 00077 { 00078 setEnabled(false); 00079 mDisabledPicture->display(getElementArea().x + parentViewport->x, getElementArea().y + parentViewport->y); 00080 } 00081 } |
Here is the call graph for this function:
|
Reimplemented from CSGrafikElement. Definition at line 128 of file CSIcon.h. References layoutSetupPictureIcon().
00128 {layoutSetupPictureIcon();} |
Here is the call graph for this function:
|
static element, name of this class (introsepection)
Reimplemented from CSIcon. Definition at line 11 of file CSIcon.cpp. Referenced by getType(). |