summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GItemView.h
AgeCommit message (Collapse)Author
2020-02-06LibGfx: Unpublish Gfx::Rect from global namespaceAndreas Kling
2020-02-06LibDraw: Put all classes in the Gfx namespaceAndreas Kling
I started adding things to a Draw namespace, but it somehow felt really wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename the library to LibGfx. :^)
2020-02-02LibGUI: Put all classes in the GUI namespace and remove the leading GAndreas Kling
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-01-22LibGUI: Move most of mouse event handling to GAbstractViewSergey Bugaev
This deduplicates existing code, and also gives all the model-backed widgets selection manipulation and drag support for free :^)
2020-01-22LibGUI: Move index_at_event_position() up to GAbstractViewSergey Bugaev
It's now an abstract (pure virtual) public method in GAbstractView that individual widgets have to implement. This will allow us to move more selection-related logic into GAbstractView in order to share it between implementations.
2020-01-22LibGUI: Add GItemView::index_at_event_position()Sergey Bugaev
This replaces GItemView::item_at_event_position(), which used to return a raw int, requiring callers to call model()->index() with it again.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-08LibGUI: clicking and dragging one item will drag other items in selectionDov Alperin
Previously if more than one item was selected clicking on one of them and dragging would de-select everything that is not the one that was clicked on. Now, if more than one items are selected and there is a mousedown it goes into a "mightdrag" state. The user can then perform a drag, if they don't everything that is not the item being clicked gets unselected in the mouseup event, mimicking the previous behavior.
2020-01-07LibGUI: Preserve existing GItemView selection on rubber band (#1031)DAlperin
2020-01-04LibGUI: Refine the per-item rects in GItemViewAndreas Kling
Previously we would consider anything in the large padded area around each item to also be part of the item for mouse event purposes. This didn't feel right when rubberbanding, so this patch factors out the per-item rect computation into a get_item_rects() helper which can then be used by the various functions that need it.
2020-01-04LibGUI: Add basic rubber band selection in GItemViewAndreas Kling
2019-12-08LibGUI+WindowServer: Start fleshing out drag&drop functionalityAndreas Kling
This patch enables basic drag&drop between applications. You initiate a drag by creating a GDragOperation object and calling exec() on it. This creates a nested event loop in the calling program that only returns once the drag operation has ended. On the receiving side, you get a call to GWidget::drop_event() with a GDropEvent containing information about the dropped data. The only data passed right now is a piece of text that's also used to visually indicate that a drag is happening (by showing the text in a little box that follows the mouse cursor around.) There are things to fix here, but we're off to a nice start. :^)
2019-09-21LibGUI: Convert GItemView to ObjectPtrAndreas Kling
2019-09-13GItemView: Add context menu supportAndreas Kling
Also, use the model_column() internally for selection as well as for painting to keep things consistent. Note that we always fire the on_context_menu_request hook, even if you didn't click on an item. In those cases, you get a GModelIndex().
2019-07-25LibCore: Introduce a C_OBJECT macro.Andreas Kling
This macro goes at the top of every CObject-derived class like so: class SomeClass : public CObject { C_OBJECT(SomeClass) public: ... At the moment, all it does is create an override for the class_name() getter but in the future this will be used to automatically insert member functions into these classes.
2019-07-04Libraries: Create top level directory for libraries.Andreas Kling
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.