mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-19 14:22:42 -06:00
RichEdit: Developing Diagram
This commit is contained in:
parent
bf539430ac
commit
2de3ce368d
1 changed files with 23 additions and 7 deletions
|
|
@ -48,13 +48,29 @@ void DiagramEditor::TheBar(Bar& bar)
|
|||
bar.Add("Snap to grid", DiagramImg::Grid(), [=] { grid = !grid; SetBar(); }).Check(grid);
|
||||
bar.Add("Display grid", DiagramImg::DisplayGrid(), [=] { display_grid = !display_grid; SetBar(); Refresh(); }).Check(display_grid);
|
||||
bar.Separator();
|
||||
bar.Add(b, shape, DPI(50));
|
||||
bar.Add(line, line_start, DPI(50));
|
||||
bar.Add(line, line_end, DPI(50));
|
||||
bar.Add(b, line_width, DPI(50));
|
||||
bar.Add(b, line_dash, DPI(50));
|
||||
bar.Add(b, ink);
|
||||
bar.Add(b, paper);
|
||||
bar.Add(shape, DPI(50));
|
||||
bar.Add(line_start, DPI(50));
|
||||
bar.Add(line_end, DPI(50));
|
||||
bar.Add(line_width, DPI(50));
|
||||
bar.Add(line_dash, DPI(50));
|
||||
bar.Add(ink);
|
||||
bar.Add(paper);
|
||||
bar.Gap();
|
||||
Size isz = IconSz();
|
||||
DiagramItem m;
|
||||
m.pt[0] = Point(2, 2);
|
||||
m.pt[1] = Point(isz.cx - 2, isz.cy - 2);
|
||||
m.width = ~line_width;
|
||||
m.dash = ~line_dash;
|
||||
m.shape = ~shape;
|
||||
m.ink = ~ink;
|
||||
m.paper = ~paper;
|
||||
m.cap[0] = ~line_start;
|
||||
m.cap[1] = ~line_end;
|
||||
bar.Add(MakeIcon(m, isz), [=]{
|
||||
SetBar();
|
||||
// SetAttrs();
|
||||
});
|
||||
bar.Break();
|
||||
// ink.DarkContent(IsDarkContent());
|
||||
text_editor.FontTools(bar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue