49 define_event(CellEntered, cell_entered, item_presentation_model_index
const&)
50 define_event(CellLeft, cell_left, item_presentation_model_index
const&)
51 define_event(CellContextMenu, cell_context_menu, item_presentation_model_index
const&)
52 define_event(CellAction, cell_action, item_presentation_model_index
const&)
54 struct no_model : std::logic_error { no_model() : std::logic_error(
"neogfx::item_view::no_model") {} };
55 struct no_presentation_model : std::logic_error { no_presentation_model() : std::logic_error(
"neogfx::item_view::no_presentation_model") {} };
56 struct no_selection_model : std::logic_error { no_selection_model() : std::logic_error(
"neogfx::item_view::no_selection_model") {} };
57 struct no_editor : std::logic_error { no_editor() : std::logic_error(
"neogfx::item_view::no_editor") {} };
58 struct unknown_editor_type : std::logic_error { unknown_editor_type() : std::logic_error(
"neogfx::item_view::unknown_editor_type") {} };
59 struct invalid_cell_part : std::logic_error { invalid_cell_part() : std::logic_error(
"neogfx::item_view::invalid_cell_part") {} };
67 const i_item_model&
model()
const;
86 bool is_valid(item_presentation_model_index
const& aItemIndex)
const;
87 bool is_visible(item_presentation_model_index
const& aItemIndex,
bool aPartiallyVisible =
false)
const;
88 bool make_visible(item_presentation_model_index
const& aItemIndex);
89 const optional_item_presentation_model_index&
editing()
const;
90 void edit(item_presentation_model_index
const& aItemIndex);
157 virtual
void item_added(item_presentation_model_index const& aItemIndex);
158 virtual
void item_changed(item_presentation_model_index const& aItemIndex);
159 virtual
void item_removed(item_presentation_model_index const& aItemIndex);
170 virtual
void current_index_changed(const optional_item_presentation_model_index& aCurrentIndex, const optional_item_presentation_model_index& aPreviousIndex);
176 optional_item_presentation_model_index
item_at(const
point& aPosition,
bool aIncludeEntireRow = true) const;
179 void invalidate_item(item_presentation_model_index const& aItemIndex);
182 void select(item_presentation_model_index const& aItemIndex,
key_modifiers_e aKeyModifiers);
187 sink iPresentationModelSink;
188 sink iSelectionModelSink;
191 ref_ptr<i_item_presentation_model> iPresentationModel;
193 bool iUpdatingModels;
194 optional_item_presentation_model_index iItemToMakeVisible;
196 bool iIgnoreNextMouseMove;
198 optional_item_presentation_model_index iEditing;
202 optional_item_presentation_model_index iHoverCell;
203 optional_item_presentation_model_index iClickedItem;
204 optional_item_presentation_model_index iClickedCheckBox;
i_item_selection_model & selection_model()
bool updating_models() const override
virtual void tree_changed()=0
void mouse_button_released(mouse_button aButton, const point &aPosition) override
rect cell_rect(item_presentation_model_index const &aItemIndex, cell_part aPart=cell_part::Base) const
bool key_pressed(scan_code_e aScanCode, key_code_e aKeyCode, key_modifiers_e aKeyModifiers) override
void mouse_left() override
void edit(item_presentation_model_index const &aItemIndex)
optional_item_presentation_model_index item_at(const point &aPosition, bool aIncludeEntireRow=true) const
item_view(frame_style aFrameStyle=frame_style::SolidFrame, neogfx::scrollbar_style aScrollbarStyle=neogfx::scrollbar_style::Normal)
size scroll_page() const override
i_widget & editor() const
virtual void presentation_model_added(i_item_presentation_model &aNewModel)
virtual void items_filtered()
void set_selection_model(i_item_selection_model &aSelectionModel)
void disable_hot_tracking()
bool is_drag_drop_object(point const &aPosition) const override
virtual void model_changed()=0
const i_item_selection_model & selection_model() const
void set_model(i_item_model &aModel)
rect scroll_area() const override
bool editor_has_text_edit() const
text_edit & editor_text_edit() const
virtual void mode_changed(item_selection_mode aNewMode)
virtual void presentation_model_removed(i_item_presentation_model &aOldModel)
void scroll_page_updated() override
virtual dimension column_width(uint32_t aColumn) const =0
bool text_input(i_string const &aText) override
rect row_rect(item_presentation_model_index const &aItemIndex) const
i_item_presentation_model & presentation_model()
std::pair< item_model_index::value_type, coordinate > first_visible_item(i_graphics_context &aGc) const
const i_item_presentation_model & presentation_model() const
virtual void column_info_changed(item_model_index::value_type aColumnIndex)
neogfx::size_policy size_policy() const override
bool has_presentation_model() const
virtual void selection_model_changed()=0
void enable_hot_tracking()
void paint(i_graphics_context &aGc) const override
void update_scrollbar_visibility() override
virtual void item_removed(const item_model_index &aItemIndex)
void layout_items_completed() override
color palette_color(color_role aColorRole) const override
void capture_released() override
virtual rect item_display_rect(bool aIntersectItemArea=false) const =0
virtual void item_model_changed(const i_item_model &aItemModel)
const i_item_model & model() const
std::pair< item_model_index::value_type, coordinate > last_visible_item(i_graphics_context &aGc) const
item_view(i_widget &aParent, frame_style aFrameStyle=frame_style::SolidFrame, neogfx::scrollbar_style aScrollbarStyle=neogfx::scrollbar_style::Normal)
void set_selection_model(i_ref_ptr< i_item_selection_model > const &aSelectionModel)
void set_presentation_model(i_ref_ptr< i_item_presentation_model > const &aPresentationModel)
void enable_drag_drop_source(bool aEnable=true) final
void mouse_button_double_clicked(mouse_button aButton, const point &aPosition, key_modifiers_e aKeyModifiers) override
virtual void items_updated()
bool hot_tracking() const
item_view(i_layout &aLayout, frame_style aFrameStyle=frame_style::SolidFrame, neogfx::scrollbar_style aScrollbarStyle=neogfx::scrollbar_style::Normal)
virtual void presentation_model_changed()=0
bool has_selection_model() const
virtual size total_item_area(i_units_context const &aUnitsContext) const =0
virtual void item_changed(const item_model_index &aItemIndex)
widget_part hit_test(const point &aPosition) const override
bool is_valid(item_presentation_model_index const &aItemIndex) const
void set_presentation_model(i_item_presentation_model &aPresentationModel)
bool use_scrollbar_container_updater() const override
virtual void selection_changed(const item_selection &aCurrentSelection, const item_selection &aPreviousSelection)
virtual void item_added(const item_model_index &aItemIndex)
void set_model(i_ref_ptr< i_item_model > const &aModel)
virtual void items_sorted()
bool is_visible(item_presentation_model_index const &aItemIndex, bool aPartiallyVisible=false) const
virtual void current_index_changed(const optional_item_presentation_model_index &aCurrentIndex, const optional_item_presentation_model_index &aPreviousIndex)
virtual void items_sorting()
const optional_item_presentation_model_index & editing() const
bool make_visible(item_presentation_model_index const &aItemIndex)
void mouse_button_pressed(mouse_button aButton, const point &aPosition, key_modifiers_e aKeyModifiers) override
void mouse_moved(const point &aPosition, key_modifiers_e aKeyModifiers) override
void end_edit(bool aCommit)
void header_view_updated(header_view &aHeaderView, header_view_update_reason aUpdateReason) override
void focus_gained(focus_reason aFocusReason) override
virtual void items_filtering()
void mouse_entered(const point &aPosition) override
bool beginning_edit() const
header_view_update_reason
default_geometry_value_type dimension
default_geometry_value_type coordinate
std::optional< item_model_index > optional_item_model_index
#define define_event(name, declName,...)