|
Blender V5.0
|
#include <spreadsheet_column_values.hh>
Public Member Functions | |
| ColumnValues (std::string name, GVArray data, const ColumnValueDisplayHint display_hint=ColumnValueDisplayHint::None) | |
| virtual | ~ColumnValues ()=default |
| eSpreadsheetColumnValueType | type () const |
| StringRefNull | name () const |
| int | size () const |
| const GVArray & | data () const |
| ColumnValueDisplayHint | display_hint () const |
| float | fit_column_width_px (const std::optional< int64_t > &max_sample_size=std::nullopt) const |
| float | fit_column_values_width_px (const std::optional< int64_t > &max_sample_size=std::nullopt) const |
Protected Attributes | |
| std::string | name_ |
| GVArray | data_ |
| ColumnValueDisplayHint | display_hint_ |
This represents a column in a spreadsheet. It has a name and provides a value for all the cells in the column.
Definition at line 25 of file spreadsheet_column_values.hh.
|
inline |
Definition at line 33 of file spreadsheet_column_values.hh.
References BLI_assert, data(), data_, display_hint(), display_hint_, name(), name_, and blender::ed::spreadsheet::None.
|
virtualdefault |
|
inline |
Definition at line 59 of file spreadsheet_column_values.hh.
References data_.
Referenced by blender::ed::spreadsheet::apply_row_filter(), ColumnValues(), and blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell().
|
inline |
Definition at line 64 of file spreadsheet_column_values.hh.
References display_hint_.
Referenced by ColumnValues(), and blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell_value().
| float blender::ed::spreadsheet::ColumnValues::fit_column_values_width_px | ( | const std::optional< int64_t > & | max_sample_size = std::nullopt | ) | const |
Same as above, but only takes the values into account (ignoring the name).
Definition at line 575 of file spreadsheet_layout.cc.
References BLF_default(), BLF_size(), data_, blender::ed::spreadsheet::estimate_max_column_width(), SPREADSHEET_VALUE_TYPE_BOOL, SPREADSHEET_VALUE_TYPE_BUNDLE_ITEM, SPREADSHEET_VALUE_TYPE_BYTE_COLOR, SPREADSHEET_VALUE_TYPE_COLOR, SPREADSHEET_VALUE_TYPE_FLOAT, SPREADSHEET_VALUE_TYPE_FLOAT2, SPREADSHEET_VALUE_TYPE_FLOAT3, SPREADSHEET_VALUE_TYPE_FLOAT4X4, SPREADSHEET_VALUE_TYPE_INSTANCES, SPREADSHEET_VALUE_TYPE_INT32, SPREADSHEET_VALUE_TYPE_INT32_2D, SPREADSHEET_VALUE_TYPE_INT32_3D, SPREADSHEET_VALUE_TYPE_INT64, SPREADSHEET_VALUE_TYPE_INT8, SPREADSHEET_VALUE_TYPE_QUATERNION, SPREADSHEET_VALUE_TYPE_STRING, SPREADSHEET_VALUE_TYPE_UNKNOWN, SPREADSHEET_WIDTH_UNIT, type(), UI_DEFAULT_TEXT_POINTS, UI_ICON_SIZE, UI_SCALE_FAC, and UI_UNIT_X.
Referenced by fit_column_width_px().
| float blender::ed::spreadsheet::ColumnValues::fit_column_width_px | ( | const std::optional< int64_t > & | max_sample_size = std::nullopt | ) | const |
Get a good column width for the column name and values.
| max_sample_size | If provided, only a subset of the column values are inspected to determine the width. This is useful when there are lots of rows to avoid unnecessarily long computations in drawing code. If provided, there is also an enforced minimum width to avoid very narrow columns when the sampled values all happen to be very short. |
Definition at line 742 of file spreadsheet_layout.cc.
References BLF_default(), BLF_size(), BLF_width(), fit_column_values_width_px(), name_, SPREADSHEET_WIDTH_UNIT, UI_DEFAULT_TEXT_POINTS, and UI_SCALE_FAC.
Referenced by blender::ed::spreadsheet::spreadsheet_main_region_draw().
|
inline |
Definition at line 49 of file spreadsheet_column_values.hh.
References name_.
Referenced by ColumnValues(), blender::ed::spreadsheet::spreadsheet_filter_rows(), and blender::ed::spreadsheet::spreadsheet_main_region_draw().
|
inline |
Definition at line 54 of file spreadsheet_column_values.hh.
References data_.
Referenced by blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell().
|
inline |
Definition at line 44 of file spreadsheet_column_values.hh.
References blender::ed::spreadsheet::cpp_type_to_column_type(), and data_.
Referenced by fit_column_values_width_px(), and blender::ed::spreadsheet::spreadsheet_main_region_draw().
|
protected |
Definition at line 29 of file spreadsheet_column_values.hh.
Referenced by ColumnValues(), data(), fit_column_values_width_px(), size(), and type().
|
protected |
Definition at line 30 of file spreadsheet_column_values.hh.
Referenced by ColumnValues(), and display_hint().
|
protected |
Definition at line 27 of file spreadsheet_column_values.hh.
Referenced by ColumnValues(), fit_column_width_px(), and name().