summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-10-23 01:36:55 +0200
committerMatthias Melcher <github@matthiasm.com>2023-10-23 01:36:55 +0200
commit17baeceb7ab90251f99c7909eb9eeca92aec5a05 (patch)
tree76fc446e2060f38dfda5e769640c2277d2010eb6 /src
parentab6ef9d52f60ac991baafc7af33775e34484f358 (diff)
FLUID: Positioning grid cells intuitively.
User can now drag widgets from the toolbox into the grid or use the context menu to add them into the corresponding cell. If no position is indicated, now children are added at the first free cell.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Grid.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Fl_Grid.cxx b/src/Fl_Grid.cxx
index 9de77c7b9..ac4f9f224 100644
--- a/src/Fl_Grid.cxx
+++ b/src/Fl_Grid.cxx
@@ -1142,6 +1142,14 @@ int Fl_Grid::row_gap(int row) const {
return 0;
}
+int Fl_Grid::computed_col_width(int col) const {
+ return Cols_[col].w_;
+}
+
+int Fl_Grid::computed_row_height(int row) const {
+ return Rows_[row].h_;
+}
+
/**
Output layout information of this Fl_Grid to stderr.