From b4fd7037ac37286146165b89282e6ab893e63a78 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 22 Oct 2023 01:50:06 +0200 Subject: FLUID: more Fl_Grid settings --- src/Fl_Grid.cxx | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_Grid.cxx b/src/Fl_Grid.cxx index a4a20b2fa..56a8b71d9 100644 --- a/src/Fl_Grid.cxx +++ b/src/Fl_Grid.cxx @@ -922,6 +922,11 @@ void Fl_Grid::col_width(const int *value, size_t size) { need_layout(1); } +int Fl_Grid::col_width(int col) const { + if (col >= 0 && col < cols_) return Cols_[col].minw_; + return 0; +} + /** Set the weight of a column. @@ -987,6 +992,11 @@ void Fl_Grid::col_weight(const int *value, size_t size) { need_layout(1); } +int Fl_Grid::col_weight(int col) const { + if (col >= 0 && col < cols_) return Cols_[col].weight_; + return 0; +} + /** Set the gap of column \c col. @@ -1018,6 +1028,11 @@ void Fl_Grid::col_gap(const int *value, size_t size) { need_layout(1); } +int Fl_Grid::col_gap(int col) const { + if (col >= 0 && col < cols_) return Cols_[col].gap_; + return 0; +} + /** Set the minimal row height of row \c row. @@ -1056,6 +1071,11 @@ void Fl_Grid::row_height(const int *value, size_t size) { need_layout(1); } +int Fl_Grid::row_height(int row) const { + if (row >= 0 && row < rows_) return Rows_[row].minh_; + return 0; +} + /** Set the row weight of row \c row. @@ -1077,7 +1097,6 @@ void Fl_Grid::row_weight(int row, int value) { \see Fl_Grid::col_weight(const int *value, size_t size) for handling of the \p value array and \p size. */ - void Fl_Grid::row_weight(const int *value, size_t size) { Row *r = Rows_; for (int i = 0; i < rows_; i++, value++, r++) { @@ -1088,6 +1107,11 @@ void Fl_Grid::row_weight(const int *value, size_t size) { need_layout(1); } +int Fl_Grid::row_weight(int row) const { + if (row >= 0 && row < rows_) return Rows_[row].weight_; + return 0; +} + /** Set the gap of row \c row. @@ -1120,6 +1144,11 @@ void Fl_Grid::row_gap(const int *value, size_t size) { need_layout(1); } +int Fl_Grid::row_gap(int row) const { + if (row >= 0 && row < rows_) return Rows_[row].gap_; + return 0; +} + /** Output layout information of this Fl_Grid to stderr. -- cgit v1.2.3