class_property(icon) = "<:ecere>controls/dropBox.png";
- watch(foreground)
- {
- listBox.foreground = foreground;
- };
- watch(background)
- {
- listBox.background = background;
- };
- watch(selectionColor)
- {
- listBox.selectionColor = selectionColor;
- };
- watch(selectionText)
- {
- listBox.selectionText = selectionText;
- };
+ watch(foreground) { listBox.foreground = foreground; if(editBox) editBox.foreground = foreground; };
+ watch(background) { listBox.background = background; if(editBox) editBox.background = background; };
+ watch(selectionColor) { listBox.selectionColor = selectionColor; if(editBox) editBox.selectionColor = selectionColor; };
+ watch(selectionText) { listBox.selectionText = selectionText; if(editBox) editBox.selectionText = selectionText; };
+ watch(opacity) { listBox.opacity = opacity; if(editBox) editBox.opacity = opacity; };
public:
property bool activeStipple
{
char tempString[4096];
if(currentRow)
- editBox.contents = ((char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
+ editBox.contents = ((const char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
else
editBox.contents = "";
}
get { return currentRow; }
};
property DataRow firstRow { get { return this ? listBox.firstRow : null; } };
- property char * contents { property_category $"Data" set { if(editBox) editBox.contents = value; } get { return editBox ? editBox.contents : null; } };
+ property DataRow lastRow { get { return this ? listBox.lastRow : null; } };
+ property const char * contents { property_category $"Data" set { if(editBox) editBox.contents = value; } get { return editBox ? editBox.contents : null; } };
property bool editText
{
property_category $"Behavior"
this, textHorzScroll = true, borderStyle = 0;
anchor = Anchor { left = 0, top = 0, right = BTN_WIDTH, bottom = 0 };
// visible = false, modifyVirtualArea = false;
+ foreground = foreground;
+ background = background;
+ selectionColor = selectionColor;
+ selectionText = selectionText;
};
incref editBox;
editBox.Create();
virtual bool Window::NotifySelect(DropBox dropBox, DataRow row, Modifiers mods);
virtual bool Window::NotifyClose(DropBox dropBox);
virtual bool Window::NotifyHighlight(DropBox dropBox, DataRow row, Modifiers mods);
- virtual bool Window::NotifyTextEntry(DropBox dropBox, char * string, bool confirmed);
+ virtual bool Window::NotifyTextEntry(DropBox dropBox, const char * string, bool confirmed);
virtual Window OnDropDown()
{
}
// Methods
- DataRow AddStringf(char * format, ...)
+ DataRow AddStringf(const char * format, ...)
{
if(this)
{
return null;
}
- DataRow AddString(char * string)
+ DataRow AddString(const char * string)
{
if(this)
{
any_object GetData(DataField field)
{
- if(this)
- {
- // TODO: Fix this shouldn't be required (memguard?)
- return (void *)currentRow.GetData(field);
- }
- return null;
+ return this ? currentRow.GetData(field) : null;
}
void Sort(DataField field, int order)
{
char tempString[4096];
if(currentRow)
- editBox.contents = ((char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
+ editBox.contents = ((const char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
else
editBox.contents = "";
}
{
char tempString[4096];
if(currentRow)
- editBox.contents = ((char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
+ editBox.contents = ((const char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
else
editBox.contents = "";
}
{
char tempString[4096];
if(currentRow)
- editBox.contents = ((char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
+ editBox.contents = ((const char *(*)(void *, void *, char *, void *, bool *))(void *)dataType._vTbl[__ecereVMethodID_class_OnGetString])(dataType, currentRow.GetData(null), tempString, null, null);
else
editBox.contents = "";
if(active)