Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_spreadsheet/spreadsheet_layout.hh
- This file was moved from source/blender/editors/space_spreadsheet/spreadsheet_from_geometry.hh.
| Show All 10 Lines | |||||
| * | * | ||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "BKE_geometry_set.hh" | #include <optional> | ||||
| #include "BLI_resource_scope.hh" | #include "spreadsheet_column_values.hh" | ||||
| #include "spreadsheet_draw.hh" | |||||
| #include "spreadsheet_column_layout.hh" | |||||
| struct bContext; | |||||
| namespace blender::ed::spreadsheet { | namespace blender::ed::spreadsheet { | ||||
| void spreadsheet_columns_from_geometry(const bContext *C, | struct ColumnLayout { | ||||
HooglyBoogly: To me `ColumnLayout` sounds like more than one column. Maybe Simply `Column`? Or if that's too… | |||||
JacquesLuckeAuthorUnsubmitted Done Inline ActionsYeah, I ran a bit into naming conflicts here. I wanted to call the thing in DNA SpreadsheetColumn. JacquesLucke: Yeah, I ran a bit into naming conflicts here. I wanted to call the thing in DNA… | |||||
| Object *object_eval, | const ColumnValues *values; | ||||
| SpreadsheetColumnLayout &column_layout, | int width; | ||||
| ResourceScope &scope); | }; | ||||
| /* This contains information required to create a spreadsheet drawer from columns. */ | |||||
| struct SpreadsheetLayout { | |||||
| Vector<ColumnLayout> columns; | |||||
| Span<int64_t> row_indices; | |||||
| int index_column_width = 100; | |||||
| }; | |||||
| std::unique_ptr<SpreadsheetDrawer> spreadsheet_drawer_from_layout( | |||||
| const SpreadsheetLayout &spreadsheet_layout); | |||||
| } // namespace blender::ed::spreadsheet | } // namespace blender::ed::spreadsheet | ||||
To me ColumnLayout sounds like more than one column. Maybe Simply Column? Or if that's too vague, SpreadsheetColumn might be an okay alternative?