History log of /haiku/src/apps/icon-o-matic/gui/ShapeListView.cpp
Revision Date Author Comments
# be84a3d6 23-Dec-2023 John Scipione <jscipione@gmail.com>

Icon-O-Matic: Minor changes and style fixes to list views

Not 100% style changes but the functional changes are very minor.
This is to create a clean base on which to make my other changes.

Remove commented out code. Remove LIB_LAYOUT.

Replace calls to _SetDropAnticipationRect with assignment to fDropRect,
make all methods protected. Rename _SetDropAnticipationRect to
InvalidateDropRect and remove _'s from methods.

Some extra NULL checks are included in ShapeListView and it has been
de-indented.

omit .0 where it doesn't matter.
rename r to rect
tab style on classes
use SetHighUIColor/SetLowUIColor where appropriate

Change-Id: Ife514452dc6ea5d5cd75ccba2fd13d46d69bcffc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7214
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 4b0dffe5 21-Aug-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Make list items copy/pastable

Also:
* make transformers draggable
* clean up archiving code

Partially addresses #18400

Change-Id: Ibc384a1919e1330113a5e2857da16284181a834e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6869
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 64279352 22-Jun-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Generalize some classes

* Turns PathContainer, ShapeContainer, StyleContainer into Container.
* Makes Shape use Container for storing Tansformers instead of
reinventing the wheel yet again.
* Moves common logic from AddPathsCommand, AddStylesCommand,
AddShapesCommand, and AddTransformersCommand to AddCommand.
* Factors out common logic from two more commands similar to above.
This adds the MoveCommand and RemoveCommand classes.
* Cleans up some code style.

Change-Id: I59eca94a1c45eac608514f269f6e5f8628f93fab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6640
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 098eaec6 08-Jun-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Add reference images

Fixes #2748

Also fixes a comment misstating a function's name and code style.

Change-Id: I609a1f1e100ded647818e70b428cedc48cf29036
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6604
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 0cbb6c11 09-May-2015 Stephan Aßmus <superstippi@gmx.de>

Icon-O-Matic: Make GradientTransformable a BReferenceable

* Switch to using support/Referenceable.h instead of using an older copy
of this code.
* Make GradientTransformable a BReferenceable and fix #12033.


# e4ef6682 06-May-2012 Stephan Aßmus <superstippi@gmx.de>

Implemented drag&drop of shape items between I-O-M windows.

* The ShapeListView also knows the PathContainer and StyleContainer
* When constructing the drag message, also include a complete archive
of the dragged shapes, bundled with archives for each included path
and the style.
* When handling the drop, and it came from another I-O-M window,
exract the Shape archive bundle from the drag message. For the
Style and the included Paths, try to find an existing Style and
existing Paths and reference those in the added Shape(s) instead
of adding duplicates.


# 7a201256 06-May-2012 Stephan Aßmus <superstippi@gmx.de>

Style cleanup, no functional change intended


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 518852fc 29-Dec-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by Dziadek: localize IconOMatic


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40025 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7974d3dc 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 015a014a 21-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* fixed quite a few selections bugs, most were caused by cyclic notifications,
and the mechanism to prevent them not working...
* could have fixed the "there are still listeners attached" bug (debugger drop)
on exit, I have not seen it again, but I am not sure if it is really fixed
* introduced a way to ask the user, if changes should be saved and then
pick up the line of thought after saving


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22269 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 664c21b3 15-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* don't always forget the last export mode in SavePanel
(was only saved when switching from "export" to "save")
* make use of drop index when dragging and dropping paths in
list view


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19519 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4bd80a2 10-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

* when loading an icon via drag&drop, the file will be remembered
for saving later
* added "Clean Up" feature to "Path" menu
* added "Freeze Transformation" to "Shape" menu (will apply the
current shape transformation onto the path and reset the shape
transformation to identity)
* small cleanup in ShapeListView
* implemented zooming in CanvasView
* added context menu while editing a path
* implemented undo/redo for transforming points
(press T or use context menu)
* added "Split Points" feature (path editing context menu), it will
make two points from one control point
* improved selecting path points with selection rect
* improved SVG import for zuMis BeOS icons (more precise scale)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18800 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e1ba39f 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* merged Icon-O-Matic from Ingos layout branch into trunk (r18134:18685)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61b0e9e3 12-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* added a little bit of tracing to object destruction, since there
seems to be a problem when quitting the app
* added Undo/Redo commands for numerous operations
- (un)assigning VectorPaths to Shapes
- adding new VectorPaths
- removing VectorPaths
- adding Shapes
- transforming Shapes
- adding Styles
- changing Style color
* there was a mix up in classes inheriting from SimpleListView,
RemoveItemList() gives a list of item pointers, not indices
* GradientControl sent the focus notification to the window instead
of the set BHandler target
* StyleView takes care of transfering the current Style color or
the focused gradient stop color to the CurrentColor object, so
the current color of the SwatchGroup is synced
* small improvement to layout of SwatchGroup
* SwatchGroup no longer knows anything about a Style
* fixed syncing the global Selection to the listview selection
at least for ShapeListView
* implemented cloning Shapes
- added Transformer::Clone(VectorSource& source) to all Transformers
- ShapeListView uses this when dropping shapes with shift pressed
* updated NOTES
* added Transformable::matrix_size, so that "6" isn't hardcoded
everywhere (though it still is at most places)
* added listener interface to TransformBox, this is used by
the new TransformObjectsCommand, as long as the TransformBox still
exists, the command modifies the TransformBox transformation instead
of messing with the objects itself
* fixed hotspot size in TransformBox by using the zoom level of
the CanvasView
* TransformBox rotates/scales correctly around the visible pivot
* fixed TransformCommand toggling to transformation (the diff was bogus)
* Gradient doesn't trigger unnecessary notifications in SetColor()
* CanvasView doesn't eat keyboard events when the GradientControl or
one of the ListViews has focus (is a hack currently...)
* fixed bug in PropertyListView when it calls the PropertyChanged()
hook: because of the notification mechanism, the Properties might
be toast after the hook returns
* moved all GetProperty() implementations from headers into .cpp files



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18122 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bab183a2 04-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* Transformers have Name() now
* added TransformerFactory to instantiate the various types via the GUI
* added Transformer menu to main window
* added TransformerListView that shows the Transformers applied to the
selected Shape
* implemented more powerful listener interface for Shape, used by
TransformerListView


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18027 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9b4fa889 03-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* the path list view shows check boxes now when a shape is selected,
the marked paths are used in the shape
* a new path is auto-selected
* deselecting a shape still sends the selection message
* PathSource does not call agg::path_storage::start_new_path() for
each subpath... a move_to() is sufficient and makes sure the
subpaths are rendered even :-)
* updated NOTES
* moved IconView into gui subfolder


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18021 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ce8d31d 30-Jun-2006 Stephan Aßmus <superstippi@gmx.de>

* added MoveShapesCommand and RemoveShapesCommand
* ShapeContainerListener also gets the index at which a Shape was added
* ShapeListView allows to drag-sort the shapes
* ShapeListView allows to remove shapes (untested)

* IconRenderer is independent of StyleManager now, the
order of shapes is now correct
* disabled clipping for now, since clear() ignores it (clearing will
be changed for a checker background anyways)
* added copy constructor to Shape (needs to clone the Transformers yet)

* Selectable optionally knows the global Selection, so that one
could use Selectable::SetSelected() and it would add itself to
the selection (not yet used)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17995 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cfda5dd7 30-Jun-2006 Stephan Aßmus <superstippi@gmx.de>

* work in progress on GUI classes
- added IconView which just uses an IconRenderer to display a preview
of the icon at a certain size
- PathListView and ShapeListView (very much work in progress)
* actually had the gamma correction applied in the wrong direction...
now the anti-aliasing looks as smooth as planned
* added SetName() and Name() to Shape and VectorPath... will be in a
common base class later on


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17988 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0cbb6c11eec74201f566920c90ebd2c5546b7aa6 09-May-2015 Stephan Aßmus <superstippi@gmx.de>

Icon-O-Matic: Make GradientTransformable a BReferenceable

* Switch to using support/Referenceable.h instead of using an older copy
of this code.
* Make GradientTransformable a BReferenceable and fix #12033.


# e4ef668253317fde1251f6c3130a71c4ace68600 06-May-2012 Stephan Aßmus <superstippi@gmx.de>

Implemented drag&drop of shape items between I-O-M windows.

* The ShapeListView also knows the PathContainer and StyleContainer
* When constructing the drag message, also include a complete archive
of the dragged shapes, bundled with archives for each included path
and the style.
* When handling the drop, and it came from another I-O-M window,
exract the Shape archive bundle from the drag message. For the
Style and the included Paths, try to find an existing Style and
existing Paths and reference those in the added Shape(s) instead
of adding duplicates.


# 7a20125661e8c32c53f1b2401a3c0bd60134d626 06-May-2012 Stephan Aßmus <superstippi@gmx.de>

Style cleanup, no functional change intended


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 518852fca73d16198413de528219fcdfa6b04647 29-Dec-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by Dziadek: localize IconOMatic


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40025 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7974d3dcf39ce78e5885b481eee12e561ad6e096 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 015a014aa74d4366a1c2c14ecef92483ebf3e532 21-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* fixed quite a few selections bugs, most were caused by cyclic notifications,
and the mechanism to prevent them not working...
* could have fixed the "there are still listeners attached" bug (debugger drop)
on exit, I have not seen it again, but I am not sure if it is really fixed
* introduced a way to ask the user, if changes should be saved and then
pick up the line of thought after saving


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22269 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 664c21b3816749d545be1bf252239de1fdd94396 15-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* don't always forget the last export mode in SavePanel
(was only saved when switching from "export" to "save")
* make use of drop index when dragging and dropping paths in
list view


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19519 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4bd80a2dcc200d939292c877b3fdadb7f3a261e 10-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

* when loading an icon via drag&drop, the file will be remembered
for saving later
* added "Clean Up" feature to "Path" menu
* added "Freeze Transformation" to "Shape" menu (will apply the
current shape transformation onto the path and reset the shape
transformation to identity)
* small cleanup in ShapeListView
* implemented zooming in CanvasView
* added context menu while editing a path
* implemented undo/redo for transforming points
(press T or use context menu)
* added "Split Points" feature (path editing context menu), it will
make two points from one control point
* improved selecting path points with selection rect
* improved SVG import for zuMis BeOS icons (more precise scale)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18800 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e1ba39f0440e200e30b6a648e70c3e8683dc5f7 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* merged Icon-O-Matic from Ingos layout branch into trunk (r18134:18685)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61b0e9e3149012ccbd48a10dcbc7f83600bb4769 12-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* added a little bit of tracing to object destruction, since there
seems to be a problem when quitting the app
* added Undo/Redo commands for numerous operations
- (un)assigning VectorPaths to Shapes
- adding new VectorPaths
- removing VectorPaths
- adding Shapes
- transforming Shapes
- adding Styles
- changing Style color
* there was a mix up in classes inheriting from SimpleListView,
RemoveItemList() gives a list of item pointers, not indices
* GradientControl sent the focus notification to the window instead
of the set BHandler target
* StyleView takes care of transfering the current Style color or
the focused gradient stop color to the CurrentColor object, so
the current color of the SwatchGroup is synced
* small improvement to layout of SwatchGroup
* SwatchGroup no longer knows anything about a Style
* fixed syncing the global Selection to the listview selection
at least for ShapeListView
* implemented cloning Shapes
- added Transformer::Clone(VectorSource& source) to all Transformers
- ShapeListView uses this when dropping shapes with shift pressed
* updated NOTES
* added Transformable::matrix_size, so that "6" isn't hardcoded
everywhere (though it still is at most places)
* added listener interface to TransformBox, this is used by
the new TransformObjectsCommand, as long as the TransformBox still
exists, the command modifies the TransformBox transformation instead
of messing with the objects itself
* fixed hotspot size in TransformBox by using the zoom level of
the CanvasView
* TransformBox rotates/scales correctly around the visible pivot
* fixed TransformCommand toggling to transformation (the diff was bogus)
* Gradient doesn't trigger unnecessary notifications in SetColor()
* CanvasView doesn't eat keyboard events when the GradientControl or
one of the ListViews has focus (is a hack currently...)
* fixed bug in PropertyListView when it calls the PropertyChanged()
hook: because of the notification mechanism, the Properties might
be toast after the hook returns
* moved all GetProperty() implementations from headers into .cpp files



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18122 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bab183a27305174861a27a136599b863d22318c7 04-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* Transformers have Name() now
* added TransformerFactory to instantiate the various types via the GUI
* added Transformer menu to main window
* added TransformerListView that shows the Transformers applied to the
selected Shape
* implemented more powerful listener interface for Shape, used by
TransformerListView


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18027 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9b4fa889fd63d9f22bffcf743dc22f25eef8ebd6 03-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* the path list view shows check boxes now when a shape is selected,
the marked paths are used in the shape
* a new path is auto-selected
* deselecting a shape still sends the selection message
* PathSource does not call agg::path_storage::start_new_path() for
each subpath... a move_to() is sufficient and makes sure the
subpaths are rendered even :-)
* updated NOTES
* moved IconView into gui subfolder


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18021 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ce8d31d0911191d25b034aa0aa4a3091dfa8c56 30-Jun-2006 Stephan Aßmus <superstippi@gmx.de>

* added MoveShapesCommand and RemoveShapesCommand
* ShapeContainerListener also gets the index at which a Shape was added
* ShapeListView allows to drag-sort the shapes
* ShapeListView allows to remove shapes (untested)

* IconRenderer is independent of StyleManager now, the
order of shapes is now correct
* disabled clipping for now, since clear() ignores it (clearing will
be changed for a checker background anyways)
* added copy constructor to Shape (needs to clone the Transformers yet)

* Selectable optionally knows the global Selection, so that one
could use Selectable::SetSelected() and it would add itself to
the selection (not yet used)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17995 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cfda5dd75bf4c1cae5b1aa808f37b59da114be26 30-Jun-2006 Stephan Aßmus <superstippi@gmx.de>

* work in progress on GUI classes
- added IconView which just uses an IconRenderer to display a preview
of the icon at a certain size
- PathListView and ShapeListView (very much work in progress)
* actually had the gamma correction applied in the wrong direction...
now the anti-aliasing looks as smooth as planned
* added SetName() and Name() to Shape and VectorPath... will be in a
common base class later on


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17988 a95241bf-73f2-0310-859d-f6bbb57e9c96