Add Supports for Signalling Panel and its Actions and also Completely Test it ...

This commit is contained in:
2024-09-25 06:41:21 +03:30
parent 960ac6fd82
commit 20aeac12f6
3 changed files with 286 additions and 90 deletions
@@ -122,6 +122,16 @@ class XCButton : XSCBase
ObjectSetInteger(0, mName, OBJPROP_BGCOLOR, value);
}
/**
* Set Object Text Color ...
*
* @param value: Color
*/
void SetColor(color value)
{
ObjectSetInteger(0, mName, OBJPROP_COLOR, value);
}
/**
* Set Object Text ...
*
@@ -152,6 +162,16 @@ class XCButton : XSCBase
ObjectSetInteger(0, mName, OBJPROP_BACK, value);
}
/**
* Set Button Click State ...
*
* @param value: state
*/
void SetState(bool value)
{
ObjectSetInteger(0, mName, OBJPROP_STATE, value);
}
//
// Protected ...
protected:
+31 -11
View File
@@ -107,7 +107,7 @@ class XCPanel : XSCBase
//
mTitleBarName = name + "_TITLE_BAR";
mTitleTextName = name + "_CAPTION";
mCaptionLblName = name + "_CAPTION";
mBodyName = name + "_BODY";
//
@@ -156,22 +156,22 @@ class XCPanel : XSCBase
//
// Caption ...
result = mTitleText.Create(mTitleTextName, xDis, yDis);
result = mCaptionLbl.Create(mCaptionLblName, xDis, yDis);
if (!result)
{
//
Destroy();
return result;
}
mTitleText.SetText(caption);
mTitleText.SetAnchor(captionAnchor);
mTitleText.SetTextColor(captionColor);
mTitleText.SetFontSize(captionontSize);
mCaptionLbl.SetText(caption);
mCaptionLbl.SetAnchor(captionAnchor);
mCaptionLbl.SetTextColor(captionColor);
mCaptionLbl.SetFontSize(captionontSize);
//
// Adding Child Objects ...
mTitleBar.Add(mBodyName);
mTitleBar.Add(mTitleTextName);
mTitleBar.Add(mCaptionLblName);
//
return result;
@@ -185,12 +185,12 @@ class XCPanel : XSCBase
//
mBodyName = NULL;
mTitleBarName = NULL;
mTitleTextName = NULL;
mCaptionLblName = NULL;
//
mBody.Destroy();
mTitleBar.Destroy();
mTitleText.Destroy();
mCaptionLbl.Destroy();
}
/**
@@ -226,6 +226,26 @@ class XCPanel : XSCBase
mTitleBar.Add(name);
}
/**
* Retrieve Panel Caption ...
*
* @return ( string )
*/
string Caption()
{
return mCaptionLbl.GetText();
}
/**
* Set Panel Caption ...
*
* @param value: Caption
*/
void Caption(string value)
{
mCaptionLbl.SetText(value);
}
//
protected:
private:
@@ -235,10 +255,10 @@ class XCPanel : XSCBase
//
string mBodyName;
string mTitleBarName;
string mTitleTextName;
string mCaptionLblName;
//
XCLabel mTitleText;
XCLabel mCaptionLbl;
XCRectangleLabel mBody;
XCRectangleLabel mTitleBar;