layout editor: horizontal-resize icon, divider drag follows the pointer; x caption on every labelled plot; probes and docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0c228c4822
commit
7972646dd2
14 files changed
+312
-65
No files matched your search
+11
-3
@@ -209,12 +209,17 @@ struct App {
|
||||
int layout_drag_row = -1;
|
||||
std::vector<float> layout_drag_start;
|
||||
/// Column drag state: which plot (right-hand cell), the two starting *plot* widths in logical px
|
||||
/// (a cell's rect minus the y gutter only the first cell of a row has), and the cell weights
|
||||
/// snapshot at drag begin (`layout_col_apply()` redistributes the pair's weight sum from these, so
|
||||
/// a drag stays relative to where it started).
|
||||
/// (each plot's `layout().axes.w`, the area the plotter places a cell by -- not the cell rect, which
|
||||
/// adds the y and right gutters and the gap), and the cell weights snapshot at drag begin
|
||||
/// (`layout_col_apply()` redistributes the pair's weight sum from these, so a drag stays relative to
|
||||
/// where it started).
|
||||
int layout_col_drag_plot = -1;
|
||||
double layout_col_drag_left0 = 0.0;
|
||||
double layout_col_drag_right0 = 0.0;
|
||||
/// The drag handle's x in the overlay's coordinates (logical px) when the drag began. The handle is
|
||||
/// re-placed on the divider every frame, and a gesture reports its offset in the handle's own, moving,
|
||||
/// coordinates; `layout_col_total_offset()` adds the handle's displacement since this back.
|
||||
double layout_col_drag_handle_x0 = 0.0;
|
||||
std::vector<float> layout_col_drag_start;
|
||||
/// The editor's way out: one `Done` button in the plot area's top-right corner while
|
||||
/// the editor is up. Not part of `layout_buttons`, which is one button per row and per
|
||||
@@ -2121,6 +2126,9 @@ GtkWidget* layout_col_handle(App& a, int plot);
|
||||
/// (the right-hand cell) begins with. False when `plot` has no left neighbour.
|
||||
bool layout_col_drag_begin(App& app, int plot);
|
||||
void layout_col_apply(App& app, int plot, double offset_px);
|
||||
/// A column drag's pointer travel from what its gesture reports: `offset` is relative to the handle, which
|
||||
/// has moved from `handle_begin` to `handle_now` (same units, the overlay's) since the drag began.
|
||||
double layout_col_total_offset(double offset, double handle_now, double handle_begin);
|
||||
void layout_probe_report(App& a, const char* what);
|
||||
/// The split in the report lines, from the `RowSet` alone (no widget is asked, so the exit dump can
|
||||
/// use them): cells per figure row (`1,2,1`) and each figure row's cell weights, rows divided by `|`
|
||||
|
||||
Reference in new issue
Block a user