handle part() call return with smart pointer
SVN revision: 38195
This commit is contained in:
parent
78f32ba132
commit
29e000ad38
|
@ -179,7 +179,6 @@ src/ecore/Makefile
|
||||||
src/edje/Makefile
|
src/edje/Makefile
|
||||||
src/esmart/Makefile
|
src/esmart/Makefile
|
||||||
src/evas/Makefile
|
src/evas/Makefile
|
||||||
src/edb/Makefile
|
|
||||||
src/eet/Makefile
|
src/eet/Makefile
|
||||||
src/emotion/Makefile
|
src/emotion/Makefile
|
||||||
src/etk/Makefile
|
src/etk/Makefile
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
## Created by Anjuta - will *NOT* be overwritten
|
## Created by Anjuta - will *NOT* be overwritten
|
||||||
SUBDIRS = common ecore edje esmart evas edb eet emotion etk ewl misc
|
|
||||||
|
SUBDIRS = common ecore edje esmart evas eet emotion etk ewl misc
|
||||||
|
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
|
|
||||||
|
@ -13,7 +14,6 @@ libeflpp_la_SOURCES =
|
||||||
|
|
||||||
libeflpp_la_LDFLAGS = common/libeflpp_common.la\
|
libeflpp_la_LDFLAGS = common/libeflpp_common.la\
|
||||||
ecore/libeflpp_ecore.la\
|
ecore/libeflpp_ecore.la\
|
||||||
edb/libeflpp_edb.la\
|
|
||||||
edje/libeflpp_edje.la\
|
edje/libeflpp_edje.la\
|
||||||
eet/libeflpp_eet.la\
|
eet/libeflpp_eet.la\
|
||||||
emotion/libeflpp_emotion.la\
|
emotion/libeflpp_emotion.la\
|
||||||
|
@ -25,7 +25,6 @@ libeflpp_la_LDFLAGS = common/libeflpp_common.la\
|
||||||
|
|
||||||
libeflpp_la_DEPENDENCIES = common/libeflpp_common.la\
|
libeflpp_la_DEPENDENCIES = common/libeflpp_common.la\
|
||||||
ecore/libeflpp_ecore.la\
|
ecore/libeflpp_ecore.la\
|
||||||
edb/libeflpp_edb.la\
|
|
||||||
edje/libeflpp_edje.la\
|
edje/libeflpp_edje.la\
|
||||||
eet/libeflpp_eet.la\
|
eet/libeflpp_eet.la\
|
||||||
emotion/libeflpp_emotion.la\
|
emotion/libeflpp_emotion.la\
|
||||||
|
|
|
@ -98,19 +98,17 @@ bool EvasEdje::hasPart( const char* partname ) const
|
||||||
return edje_object_part_exists( o, partname );
|
return edje_object_part_exists( o, partname );
|
||||||
}
|
}
|
||||||
|
|
||||||
EdjePart* EvasEdje::operator[]( const char* partname )
|
CountedPtr <EdjePart> EvasEdje::operator[]( const char* partname )
|
||||||
{
|
{
|
||||||
return part( partname );
|
return part( partname );
|
||||||
}
|
}
|
||||||
|
|
||||||
EdjePart* EvasEdje::part( const char* partname )
|
CountedPtr <EdjePart> EvasEdje::part( const char* partname )
|
||||||
{
|
{
|
||||||
if ( hasPart( partname ) )
|
if ( hasPart( partname ) )
|
||||||
{
|
{
|
||||||
EdjePart* ep = _parts[partname];
|
EdjePart* ep = new EdjePart( this, partname );
|
||||||
if ( !ep ) ep = new EdjePart( this, partname );
|
return CountedPtr <EdjePart> (ep);
|
||||||
_parts[partname] = ep;
|
|
||||||
return ep;
|
|
||||||
}
|
}
|
||||||
throw PartNotExistingException (partname);
|
throw PartNotExistingException (partname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,9 +96,10 @@ class EdjePart
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EdjePart( EvasEdje* parent, const char* partname );
|
EdjePart( EvasEdje* parent, const char* partname );
|
||||||
~EdjePart();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
~EdjePart();
|
||||||
|
|
||||||
Rect geometry() const;
|
Rect geometry() const;
|
||||||
|
|
||||||
void setText( const char* text );
|
void setText( const char* text );
|
||||||
|
@ -193,13 +194,13 @@ class EvasEdje : public EvasObject
|
||||||
void recalculateLayout();
|
void recalculateLayout();
|
||||||
|
|
||||||
bool hasPart( const char* partname ) const;
|
bool hasPart( const char* partname ) const;
|
||||||
EdjePart* operator[]( const char* partname );
|
CountedPtr <EdjePart> operator[]( const char* partname );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @param partname Access a EdjePart in the EvasEdje.
|
* @param partname Access a EdjePart in the EvasEdje.
|
||||||
* @throw PartNotExistingException
|
* @throw PartNotExistingException
|
||||||
*/
|
*/
|
||||||
EdjePart* part( const char* partname );
|
CountedPtr <EdjePart> part( const char* partname );
|
||||||
|
|
||||||
/* signals and slots */
|
/* signals and slots */
|
||||||
void connect( const char* emission, const char* source, const EdjeSignalSlot& slot );
|
void connect( const char* emission, const char* source, const EdjeSignalSlot& slot );
|
||||||
|
@ -207,9 +208,6 @@ class EvasEdje : public EvasObject
|
||||||
|
|
||||||
static EvasEdje *wrap( Evas_Object* o );
|
static EvasEdje *wrap( Evas_Object* o );
|
||||||
|
|
||||||
protected:
|
|
||||||
mutable EdjePartMap _parts;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void _edje_message_handler_callback( void* data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg );
|
static void _edje_message_handler_callback( void* data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg );
|
||||||
static void _edje_signal_handler_callback( void *data, Evas_Object *obj, const char *emission, const char *source );
|
static void _edje_signal_handler_callback( void *data, Evas_Object *obj, const char *emission, const char *source );
|
||||||
|
|
Loading…
Reference in New Issue