[DEV] small change

This commit is contained in:
Edouard DUPIN 2013-11-04 22:34:40 +01:00
parent 5f7e692fa4
commit 3af8ef44cc
6 changed files with 44 additions and 14 deletions

View File

@ -21,7 +21,10 @@ namespace ewol {
private: private:
class MessageList { class MessageList {
public: public:
MessageList(const char* _message=NULL, ewol::EObject* _object=NULL) : m_message(_message), m_object(_object) { } MessageList(const char* _message=NULL, ewol::EObject* _object=NULL) :
m_message(_message), m_object(_object) {
}
const char* m_message; const char* m_message;
ewol::EObject* m_object; ewol::EObject* m_object;
}; };
@ -29,7 +32,9 @@ namespace ewol {
public: public:
EMultiCast(); EMultiCast();
~EMultiCast(void); ~EMultiCast(void);
void anonymousSend(const char* const _messageId, const etk::UString& _data) { send(NULL, _messageId, _data); }; void anonymousSend(const char* const _messageId, const etk::UString& _data) {
send(NULL, _messageId, _data);
};
void send(ewol::EObject* _object, const char* const _message, const etk::UString& _data); void send(ewol::EObject* _object, const char* const _message, const etk::UString& _data);
void rm(ewol::EObject* _object); void rm(ewol::EObject* _object);
void add(ewol::EObject* _object, const char* const _message); void add(ewol::EObject* _object, const char* const _message);

View File

@ -79,12 +79,16 @@ namespace widget {
* @brief get the current displayed composition * @brief get the current displayed composition
* @return The base widget * @return The base widget
*/ */
ewol::Widget* getSubWidget(void) const { return m_subWidget[0]; }; ewol::Widget* getSubWidget(void) const {
return m_subWidget[0];
};
/** /**
* @brief get the current displayed composition * @brief get the current displayed composition
* @return The toggle widget * @return The toggle widget
*/ */
ewol::Widget* getSubWidgetToggle(void) const { return m_subWidget[1]; }; ewol::Widget* getSubWidgetToggle(void) const {
return m_subWidget[1];
};
protected: protected:
bool m_value; //!< Current state of the button. bool m_value; //!< Current state of the button.
public: public:
@ -99,7 +103,9 @@ namespace widget {
* @return True : The button is pressed. * @return True : The button is pressed.
* @return false : The button is released. * @return false : The button is released.
*/ */
bool getValue(void) const { return m_value; }; bool getValue(void) const {
return m_value;
};
protected: protected:
buttonLock_te m_lock; //!< Current lock state of the button. buttonLock_te m_lock; //!< Current lock state of the button.
public: public:
@ -112,7 +118,9 @@ namespace widget {
* @brief get the current button lock value. * @brief get the current button lock value.
* @return The requested lock mode * @return The requested lock mode
*/ */
buttonLock_te getLock(void) const { return m_lock; }; buttonLock_te getLock(void) const {
return m_lock;
};
protected: protected:
bool m_toggleMode; //!< The button is able to toggle. bool m_toggleMode; //!< The button is able to toggle.
public: public:
@ -125,7 +133,9 @@ namespace widget {
* @brief get the current toggle mode. * @brief get the current toggle mode.
* @return the current toggle mode. * @return the current toggle mode.
*/ */
bool getToggleMode(void) const { return m_toggleMode; }; bool getToggleMode(void) const {
return m_toggleMode;
};
private: private:
bool m_mouseHover; //!< Flag to know where the mouse is (inside the displayed widget (if not fill)). bool m_mouseHover; //!< Flag to know where the mouse is (inside the displayed widget (if not fill)).
bool m_buttonPressed; //!< Flag to know if the button is curently pressed. bool m_buttonPressed; //!< Flag to know if the button is curently pressed.
@ -147,7 +157,9 @@ namespace widget {
virtual bool onSetConfig(const ewol::EConfig& _conf); virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, etk::UString& _result) const; virtual bool onGetConfig(const char* _config, etk::UString& _result) const;
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "widget::Button"; }; virtual const char * const getObjectType(void) {
return "widget::Button";
};
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual void calculateSize(const vec2& _availlable); virtual void calculateSize(const vec2& _availlable);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);

View File

@ -131,3 +131,4 @@ bool widget::Label::loadXML(exml::Element* _node) {
setLabel(_node->getText()); setLabel(_node->getText());
return true; return true;
} }

View File

@ -36,23 +36,31 @@ namespace widget {
/** /**
* @brief destructor * @brief destructor
*/ */
virtual ~Label(void) { }; virtual ~Label(void) {
};
/** /**
* @brief change the label displayed * @brief change the label displayed
* @param[in] _newLabel The displayed decorated text. * @param[in] _newLabel The displayed decorated text.
*/ */
void setLabel(const etk::UString& _newLabel); void setLabel(const etk::UString& _newLabel);
inline void setValue(const etk::UString& _newLabel) { setLabel(_newLabel); }; inline void setValue(const etk::UString& _newLabel) {
setLabel(_newLabel);
};
/** /**
* @brief get the current displayed label * @brief get the current displayed label
* @return The displayed decorated text. * @return The displayed decorated text.
*/ */
etk::UString getLabel(void); etk::UString getLabel(void);
inline etk::UString getValue(void) { return getLabel(); }; inline etk::UString getValue(void) {
return getLabel();
};
protected: // Derived function protected: // Derived function
virtual void onDraw(void); virtual void onDraw(void);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "Ewol::Label"; }; virtual const char * const getObjectType(void) {
return "Ewol::Label";
};
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -31,7 +31,9 @@ namespace widget {
*/ */
virtual ~Layer(void); virtual ~Layer(void);
public: public:
virtual const char * const getObjectType(void) { return "Ewol::Layer"; }; virtual const char * const getObjectType(void) {
return "Ewol::Layer";
};
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos); virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
}; };

View File

@ -503,7 +503,9 @@ namespace ewol {
* @brief periodic call of this widget * @brief periodic call of this widget
* @param _event Current time property * @param _event Current time property
*/ */
virtual void periodicCall(const ewol::EventTime& _event) { }; virtual void periodicCall(const ewol::EventTime& _event) {
};
public: public:
/** /**
* @brief get the widget at the specific windows absolute position * @brief get the widget at the specific windows absolute position