History log of /haiku/src/apps/icon-o-matic/gui/ShapeListView.h
Revision Date Author Comments
# 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>


# 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.


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


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


# 325a6253 02-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Put the remaining libicon.a classes into the BPrivate::Icon namespace.
* Minor cleanup (like removing the extra blank line between the copyright and the
header guard).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20507 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


# 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


# 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.


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


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


# 325a6253ceb7c4162df2805f7aabc2a119c93534 02-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Put the remaining libicon.a classes into the BPrivate::Icon namespace.
* Minor cleanup (like removing the extra blank line between the copyright and the
header guard).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20507 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


# 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