00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
#ifndef UCOMPOUND_HPP
00029 
#define UCOMPOUND_HPP
00030 
00031 
#include "uwidget.hpp"
00032 
00033 
#include "../uicon.hpp"
00034 
00035 
namespace ufo {
00036 
00037 
class UCompoundModel;
00038 
00046 class UFO_EXPORT UCompound : 
public UWidget {
00047     UFO_DECLARE_DYNAMIC_CLASS(UCompound)
00048 
public:
00049     UCompound();
00050     UCompound(
const std::string & text);
00051     UCompound(
UIcon * icon);
00052     UCompound(
const std::string & text, 
UIcon * icon);
00053 
00058     
virtual void setText(
const std::string & text);
00059 
00064     std::string getText() 
const;
00065 
00066     
00067     
00068     
00069 
00072     
void setIcon(
UIcon * icon);
00073 
00077     
UIcon * getDefaultIcon() 
const;
00078 
00082     
virtual UIcon * getIcon() 
const;
00083 
00086     
void setDisabledIcon(
UIcon * icon);
00090     
UIcon * getDisabledIcon() 
const;
00091 
00092 
00095     
void setIconTextGap(
int iconTextGap);
00098     
int getIconTextGap() 
const;
00099 
00100 
protected:  
00101     
virtual std::ostream & paramString(std::ostream & os) 
const;
00102     
virtual void processStateChangeEvent(uint32_t state);
00103     
virtual void processStyleHintChange(uint32_t styleHint);
00104 
00105 
protected: 
00106     
UCompoundModel * getCompoundModel() 
const;
00107     
void updateMnemonic();
00108 
00109 
private:  
00111     
UIcon * m_icon;
00113     
UIcon * m_disabledIcon;
00115     
int m_iconTextGap;
00116 };
00117 
00118 
00119 
00120 
00121 
00122 
inline UIcon *
00123 UCompound::getDisabledIcon()
 const {
00124     
return m_disabledIcon;
00125 }
00126 
00127 
00128 
inline int
00129 UCompound::getIconTextGap()
 const {
00130     
return m_iconTextGap;
00131 }
00132 
00133 } 
00134 
00135 
#endif // UCOMPOUND_HPP