{
parent = this, hasHeader = true, hasVertScroll = true, alwaysEdit = true, collapseControl = true, resizable = true;
anchor = Anchor { left = 0, right = 0, top = 0, bottom = 0 };
- background = viewsBackground;
- foreground = viewsText;
- selectionColor = selectionColor, selectionText = selectionText;
+ /*
+ background = colorScheme.viewsBackground;
+ foreground = colorScheme.viewsText;
+ selectionColor = colorScheme.selectionColor;
+ selectionText = colorScheme.selectionText;
+ */
bool NotifyChanged(ListBox listBox, DataRow row)
{
char * expression = row.GetData(expressionField);
-
+
if(expression && expression[0])
{
TrimLSpaces(expression, expression);
TrimRSpaces(expression, expression);
}
-
+
if(expression && expression[0])
{
row.SetData(valueField, null);
}
return true;
}
+
+ bool NotifySelect(ListBox listBox, DataRow row, Modifiers mods)
+ {
+ if(listBox.currentField != expressionField)
+ listBox.currentField = expressionField;
+ return true;
+ }
};
DataField expressionField { "char *", true, width = 130, header = $"Expression" };
DataField typeField { "Type", false, width = 180, header = $"Type" };
return true;
}
- bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
- {
- if(active)
- {
- //listBox.SelectRow(listBox.firstRow);
- ide.RepositionWindows(false);
- }
- return true;
- }
-
bool OnClose(bool parentClosing)
{
visible = false;
void Show()
{
visible = true;
+ ide.RepositionWindows(false);
Activate();
}
void AddWatch(Watch wh)
{
DataRow row = listBox.AddRowAfter(listBox.lastRow.previous);
- row.tag = (int64)wh;
+ row.tag = (int64)(intptr)wh;
wh.row = row;
UpdateWatch(wh);
}
row.SetData(expressionField, null);
row.SetData(typeField, null);
row.SetData(valueField, null);
+ if(ide.workspace)
+ {
+ for(w : ide.workspace.watches)
+ w.row = null;
+ }
}
}
modifyVirtualArea = false,
anchor = { 0, 0, 0, 0 };
//position = { x + dataBox.absPosition.x, y + dataBox.absPosition.y };
- //size = { w, h * 4 };
+ //size = { w, h * 4 };
multiLine = true;
bool OnKeyDown(Key key, unichar ch)
void DataBox::NotifyUpdate(EditBox editBox)
{
- Modified();
+ Modified();
}
};
- dataBox.size = { w, h * 4 + 2 };
+ dataBox.size = { w, h * 4 + 2 };
if(dataBox.size.h + dataBox.position.y > dataBox.parent.clientSize.h)
dataBox.position.y = dataBox.parent.clientSize.h - dataBox.size.h;
if(dataBox.size.w + dataBox.position.x > dataBox.parent.clientSize.w)
char * string = this;
char actualString[8196];
int c, len = 0;
- for(c = 0; (ch = string[c]); c++)
+ for(c = 0; (ch = string[c]) && len < sizeof(actualString)-1; c++)
{
if(ch == '\t') { actualString[len++] = '\\'; actualString[len++] = 't'; }
else if(ch == '\r') { actualString[len++] = '\\'; actualString[len++] = 'r'; }