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/esmart/Makefile
|
||||
src/evas/Makefile
|
||||
src/edb/Makefile
|
||||
src/eet/Makefile
|
||||
src/emotion/Makefile
|
||||
src/etk/Makefile
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
## 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 =
|
||||
|
||||
|
@ -13,7 +14,6 @@ libeflpp_la_SOURCES =
|
|||
|
||||
libeflpp_la_LDFLAGS = common/libeflpp_common.la\
|
||||
ecore/libeflpp_ecore.la\
|
||||
edb/libeflpp_edb.la\
|
||||
edje/libeflpp_edje.la\
|
||||
eet/libeflpp_eet.la\
|
||||
emotion/libeflpp_emotion.la\
|
||||
|
@ -25,7 +25,6 @@ libeflpp_la_LDFLAGS = common/libeflpp_common.la\
|
|||
|
||||
libeflpp_la_DEPENDENCIES = common/libeflpp_common.la\
|
||||
ecore/libeflpp_ecore.la\
|
||||
edb/libeflpp_edb.la\
|
||||
edje/libeflpp_edje.la\
|
||||
eet/libeflpp_eet.la\
|
||||
emotion/libeflpp_emotion.la\
|
||||
|
|
|
@ -62,7 +62,7 @@ class CountedPtr {
|
|||
{
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void dispose()
|
||||
{
|
||||
|
|
|
@ -98,19 +98,17 @@ bool EvasEdje::hasPart( const char* partname ) const
|
|||
return edje_object_part_exists( o, partname );
|
||||
}
|
||||
|
||||
EdjePart* EvasEdje::operator[]( const char* partname )
|
||||
CountedPtr <EdjePart> EvasEdje::operator[]( const char* partname )
|
||||
{
|
||||
return part( partname );
|
||||
}
|
||||
|
||||
EdjePart* EvasEdje::part( const char* partname )
|
||||
CountedPtr <EdjePart> EvasEdje::part( const char* partname )
|
||||
{
|
||||
if ( hasPart( partname ) )
|
||||
{
|
||||
EdjePart* ep = _parts[partname];
|
||||
if ( !ep ) ep = new EdjePart( this, partname );
|
||||
_parts[partname] = ep;
|
||||
return ep;
|
||||
EdjePart* ep = new EdjePart( this, partname );
|
||||
return CountedPtr <EdjePart> (ep);
|
||||
}
|
||||
throw PartNotExistingException (partname);
|
||||
}
|
||||
|
|
|
@ -96,9 +96,10 @@ class EdjePart
|
|||
|
||||
private:
|
||||
EdjePart( EvasEdje* parent, const char* partname );
|
||||
~EdjePart();
|
||||
|
||||
public:
|
||||
~EdjePart();
|
||||
|
||||
Rect geometry() const;
|
||||
|
||||
void setText( const char* text );
|
||||
|
@ -193,13 +194,13 @@ class EvasEdje : public EvasObject
|
|||
void recalculateLayout();
|
||||
|
||||
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.
|
||||
* @throw PartNotExistingException
|
||||
*/
|
||||
EdjePart* part( const char* partname );
|
||||
CountedPtr <EdjePart> part( const char* partname );
|
||||
|
||||
/* signals and slots */
|
||||
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 );
|
||||
|
||||
protected:
|
||||
mutable EdjePartMap _parts;
|
||||
|
||||
private:
|
||||
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 );
|
||||
|
|
Loading…
Reference in New Issue