diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-22 01:50:06 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-22 01:51:53 +0200 |
| commit | b4fd7037ac37286146165b89282e6ab893e63a78 (patch) | |
| tree | 6b66afcd3ec3dc86305e984eafa16ae8ab8cff59 /src/Fl_Grid.cxx | |
| parent | d102e466d6a1047279dab57bcb13a74a7fddbe7f (diff) | |
FLUID: more Fl_Grid settings
Diffstat (limited to 'src/Fl_Grid.cxx')
| -rw-r--r-- | src/Fl_Grid.cxx | 31 |
1 files changed, 30 insertions, 1 deletions
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. |
