projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Support multiple window rendering" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
devel-api
/
layouting
/
measure-spec.h
diff --git
a/dali-toolkit/devel-api/layouting/measure-spec.h
b/dali-toolkit/devel-api/layouting/measure-spec.h
old mode 100644
(file)
new mode 100755
(executable)
index
f766247
..
ccc23ed
--- a/
dali-toolkit/devel-api/layouting/measure-spec.h
+++ b/
dali-toolkit/devel-api/layouting/measure-spec.h
@@
-17,10
+17,14
@@
* limitations under the License.
*/
* limitations under the License.
*/
+// EXTERNAL INCLUDES
+#include <sstream>
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/dali-common.h>
-#include <dali-toolkit/devel-api/layouting/layout-length.h>
-#include <sstream>
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/layouting/layout-length.h>
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
namespace Dali
{
namespace Dali
{
@@
-32,10
+36,9
@@
namespace Toolkit
* how to be measured. For instance, it may measure a child with an exact width and an unspecified
* height in order to determine height for width.
*/
* how to be measured. For instance, it may measure a child with an exact width and an unspecified
* height in order to determine height for width.
*/
-class DALI_
IMPOR
T_API MeasureSpec
+class DALI_
TOOLKI
T_API MeasureSpec
{
public:
{
public:
- using IntType = LayoutLength::IntType;
enum class Mode
{
enum class Mode
{
@@
-47,12
+50,12
@@
public:
};
MeasureSpec( LayoutLength measureSpec, MeasureSpec::Mode mode )
};
MeasureSpec( LayoutLength measureSpec, MeasureSpec::Mode mode )
- : mSize( measureSpec
.mValue
),
+ : mSize( measureSpec ),
mMode( mode )
{
}
mMode( mode )
{
}
- MeasureSpec(
IntType
measureSpec )
+ MeasureSpec(
LayoutLength
measureSpec )
: mSize( measureSpec ),
mMode( Mode::UNSPECIFIED )
{
: mSize( measureSpec ),
mMode( Mode::UNSPECIFIED )
{
@@
-62,8
+65,11
@@
public:
MeasureSpec& operator=( const MeasureSpec& rhs )
{
MeasureSpec& operator=( const MeasureSpec& rhs )
{
- this->mSize = rhs.mSize;
- this->mMode = rhs.mMode;
+ if( this != &rhs )
+ {
+ this->mSize = rhs.mSize;
+ this->mMode = rhs.mMode;
+ }
return *this;
}
return *this;
}
@@
-78,6
+84,16
@@
public:
}
/**
}
/**
+ * @brief Set the mode of the measure spec.
+ *
+ * @param mode The mode to set
+ */
+ void SetMode( MeasureSpec::Mode mode )
+ {
+ mMode = mode;
+ }
+
+ /**
* @brief Get the mode of the measure spec.
*
* @return The mode of the measure spec
* @brief Get the mode of the measure spec.
*
* @return The mode of the measure spec
@@
-88,11
+104,21
@@
public:
}
/**
}
/**
+ * @brief Set the size of the measure spec
+ *
+ * @param size the size to set
+ */
+ void SetSize( LayoutLength size )
+ {
+ mSize = size;
+ }
+
+ /**
* @brief Get the size of the measure spec
*
* @return the size of the measure spec
*/
* @brief Get the size of the measure spec
*
* @return the size of the measure spec
*/
-
IntType
GetSize() const
+
LayoutLength
GetSize() const
{
return mSize;
}
{
return mSize;
}
@@
-117,7
+143,7
@@
public:
return MeasureSpec( size, MeasureSpec::Mode::UNSPECIFIED );
}
return MeasureSpec( size, MeasureSpec::Mode::UNSPECIFIED );
}
- if( delta < 0 && measureSpec.mSize <
static_cast<IntType>(abs(delta)
) )
+ if( delta < 0 && measureSpec.mSize <
abs(delta
) )
{
size = 0;
}
{
size = 0;
}
@@
-128,9
+154,11
@@
public:
return MeasureSpec( size, mode );
}
return MeasureSpec( size, mode );
}
-public:
- IntType mSize; ///< The specified size
+private:
+
+ LayoutLength mSize; ///< The specified size
Mode mMode; ///< The measure mode
Mode mMode; ///< The measure mode
+
};
inline std::ostream& operator<< (std::ostream& o, const MeasureSpec& measureSpec )
};
inline std::ostream& operator<< (std::ostream& o, const MeasureSpec& measureSpec )