size.h = 240;
bool moved, logging;
-
+
ListBox listBox
{
parent = this, resizable = true, hasHeader = true, alwaysEdit = true, collapseControl = true, size = { 206, 624 };
anchor = Anchor { left = 0, top = 0, right = 0, bottom = 0 }; //visible = true
-
- 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)
{
DataRow newRow = listBox.AddRow();
newRow.SetData(locationField, null);
}
- ide.workspace.ChangeBreakpoint(row, location);
+ ide.workspace.ChangeBreakpoint(row, location); // TODO make sure passing only unix style path
}
else
{
- ide.workspace.RemoveBreakpoint((Breakpoint)row.tag);
+ ide.workspace.RemoveBreakpoint((Breakpoint)(intptr)row.tag);
// This is already done by Workspace::RemoveBreakpoint!
// listBox.DeleteRow(null);
}
}
return true;
}
-
+
bool NotifyKeyDown(ListBox listBox, DataRow row, Key key, unichar ch)
{
if((SmartKey)key == enter)
if(row && (SmartKey)key == del)
{
listBox.StopEditing(true);
- ide.workspace.RemoveBreakpoint((Breakpoint)row.tag);
+ ide.workspace.RemoveBreakpoint((Breakpoint)(intptr)row.tag);
}
return true;
}
return true;
}
};
-
+
// TODO: set field size based on font and i18n header string
// TODO: save column widths to ide settings
DataField locationField { "char *", true , width = 220, header = $"Location" };
DataField ignoreField { "char *", true , width = 80, header = $"Ignore Count" };
DataField levelField { "char *", true , width = 74, header = $"Stack Depth" };
DataField conditionField { "char *", true , width = 130, header = $"Condition" };
-
+
BreakpointsView()
{
listBox.AddField(locationField);
bool error;
int lineActive, lineUser;
int lineH;
- int scrollY = listBox.scroll.y;
- int boxH = clientSize.h;
-
+ //int scrollY = listBox.scroll.y;
+ //int boxH = clientSize.h;
+
displaySystem.FontExtent(listBox.font.font, " ", 1, null, &lineH);
//Window::OnRedraw(surface);
ide.debugger.GetCallStackCursorLine(&error, &lineActive, &lineUser);
void AddBreakpoint(Breakpoint bp)
{
- char string[32];
DataRow row = listBox.AddRow();
- row.tag = (int64)bp;
+ row.tag = (int64)(intptr)bp;
bp.row = row;
UpdateBreakpoint(row);
ide.callStackView.Update(null);
ide.callStackView.Update(null);
Update(null);
}
-
+
void UpdateBreakpoint(DataRow row)
{
if(row && row.tag)
{
char string[32];
char * location;
- Breakpoint bp = (Breakpoint)row.tag;
- location = bp.LocationToString();
+ Breakpoint bp = (Breakpoint)(intptr)row.tag;
+ location = bp.CopyUserLocationString();
+#if defined(__WIN32__)
+ ChangeCh(location, '/', '\\');
+#endif
row.SetData(locationField, location);
delete location;
if(bp.ignore == 0)
row.SetData(breaksField, bp.breaks);
}
}
-
+
void Clear()
{
listBox.Clear();