diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-19 19:38:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-19 19:38:35 +0300 |
commit | ae51cde3d783b1cec848dd8f78f3b91d85e90d8d (patch) | |
tree | 3833b6b1e5ffee549c58fbc9e8448357555c1bf6 /source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh | |
parent | 25f80508300b1a220cb5907f7eb4ab8c587c4032 (diff) |
Larger width for name column, use values for object and collection specifically
Diffstat (limited to 'source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh')
-rw-r--r-- | source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh index b36689760ed..85217d35289 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh +++ b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh @@ -20,11 +20,19 @@ #include "spreadsheet_draw.hh" +// struct Object; +// struct Collection; +#include "DNA_collection_types.h" +#include "DNA_object_types.h" + namespace blender::ed::spreadsheet { -struct IconText { - int icon_id; - StringRefNull string; +struct ObjectCellValue { + const Object *object; +}; + +struct CollectionCellValue { + const Collection *collection; }; /** @@ -35,7 +43,8 @@ class CellValue { public: /* The implementation just uses a `std::variant` for simplicity. It can be encapsulated better, * but it's not really worth the complixity for now. */ - using VariantType = std::variant<std::monostate, int, float, bool, IconText>; + using VariantType = + std::variant<std::monostate, int, float, bool, ObjectCellValue, CollectionCellValue>; VariantType value; }; @@ -61,6 +70,9 @@ class SpreadsheetColumn { { return name_; } + + /* The default width of newly created columns, in UI units. */ + float default_width = 0.0f; }; /* Utility class for the function below. */ |