#ifndef _MM_DRAWING_OBJECT_H_
#define _MM_DRAWING_OBJECT_H_
+
+enum DrawingObjectType
+{
+ CURVELINE_OBJECT,
+ ERASER_OBJECT
+};
+
class DrawingObject
{
public:
int GetBrushWidth(void) const;
void SetBrushColor(const Tizen::Graphics::Color brushColor);
void SetBrushWidth(const int width);
+ DrawingObjectType GetDrawingObjectType(void) const;
+ void SetDrawingObjectType(const DrawingObjectType objectType);
bool operator ==(const DrawingObject& rhs) const;
bool operator !=(const DrawingObject& rhs) const;
int __brushWidth;
Tizen::Graphics::Color __color;
bool __isSelected;
+ DrawingObjectType __objectType;
};
///Curve line object
, __brushWidth(0)
, __color(Color::GetColor(COLOR_ID_BLACK))
, __isSelected(false)
+ , __objectType(CURVELINE_OBJECT)
{
return;
__color = brushColor;
}
+DrawingObjectType
+DrawingObject::GetDrawingObjectType(void) const
+{
+ return __objectType;
+}
+
+void
+DrawingObject::SetDrawingObjectType(const DrawingObjectType objectType)
+{
+ __objectType = objectType;
+}
+
void
DrawingObject::SetBrushWidth(const int width)
{
__pCurveLine = new (std::nothrow) CurveLine(__pCanvas);
__pCurveLine->SetBrushWidth(__sliderValue);
__pCurveLine->SetBrushColor(__selectedColor);
+ __pCurveLine->SetDrawingObjectType(CURVELINE_OBJECT);
__drawingObjects.Add((Object* )__pCurveLine);
}
else if (__drawingMode == DRAWING_MODE_ERASER)
{
__pEraser = new (std::nothrow) Eraser(__pCanvas);
__pEraser->SetBrushWidth(__sliderValue);
+ __pEraser->SetDrawingObjectType(ERASER_OBJECT);
__drawingObjects.Add((Object* )__pEraser);
}
if (__isEditMode == false)
{
SetSaveEnabled(false);
}
+ else
+ {
+ int objectCount = __drawingObjects.GetCount();
+ bool enable = false;
+ for (int i=0; i < objectCount; i++)
+ {
+ DrawingObject* object = null;
+ object = (DrawingObject*)__drawingObjects.GetAt(i);
+ if(object != null && object->GetDrawingObjectType() == CURVELINE_OBJECT )
+ {
+ CurveLine* pCurveLine = (CurveLine*)object;
+ if(pCurveLine != null && pCurveLine->curvelinePointLists.GetCount() < 2)
+ {
+ enable = false;
+ }
+ else
+ {
+ enable = true;
+ break;
+ }
+ }
+ }
+ if(enable == true)
+ {
+ SetSaveEnabled(true);
+ }
+ else
+ {
+ SetSaveEnabled(false);
+ }
+
+ }
}
- __pComment->SetCursorPosition(0);
}
-
+ __pComment->SetCursorPosition(0);
return;
}
UpdateEntireCanvas();
__pMemoContentEditarea->HideKeypad();
int height = 0, width = 0;
__pMemoContentEditarea->GetSize(width , height);
- if(height == H_EDITAREA_NOKEYPAD)
+ if(height == H_EDITAREA_NOKEYPAD || height == 887)
{
__isSliderShow = true;
}