History log of /haiku/src/apps/icon-o-matic/generic/gui/stateview/StateView.cpp
Revision Date Author Comments
# 6da29a76 15-Aug-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Fix window resizing bug

Previously, the window could not go any smaller than the current size
after some changes were made to the icon such as adding a style.

Fixes #4711

Also cleans up some code style.

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


# ad98c7f4 25-Jul-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed warning about hiding BView::Perform().


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


# fb3e35fc 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


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


# 7c4b3726 09-Apr-2007 Stephan Aßmus <superstippi@gmx.de>

culmulative update...
* holding down space, or using the third mouse button, will force
the "pan canvas" mode
* using the mouse wheel zooms in and out
* fixed issues with the undo commands when nudging something with
the cursor keys
* manipulators can now indicate wether they changed the mouse cursor
* ChangePointCommand is no longer inserted if the point didn't change
* new "flip" points feature in context menu, flips "in" and "out" curve
control points
* mouse wheel events are now propagated together with the mouse position
* new "UndoesPrevious" method in Command interface (used to clean up
command stack)
* clean ups in CommandStack



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


# 4fac07a0 12-Nov-2006 Stephan Aßmus <superstippi@gmx.de>

* started work on saving program settins, window frame is
remembered for now
* fixed some annoying bugs:
- the snapping prevented some of the proximity checks from
working while editing a path or using the transform box,
now the Manipulators themself are responsible for mouse
snapping and can do so at the time it works best for them
- pressing the Esc key while using the transform box did
reset the transformation, but didn't exit the transform
mode (return to path editing)
* improved layout of some views when the window is resized



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


# 3ec18e87 17-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

various GCC 4 build fixes


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


# e2a31283 05-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

many improvements and bug fixes:
* added VertexSource::SetLast() used by PathSource
to call agg::path_storage::close_polygon(). The
StrokeTransformer avoids this of course. Affine
and PerspectiveTransformer forward this to their source.
* TransformerItems watch their transformers for notifications
* made VectorPath an IconObject
* VectorPath no longer uses close_polygon() when converting
to agg::path_storage to allow open strokes
* added IconObjectListView which inherits from
PropertyListView and allows to edit the properties of the
last selected object from one of the other list views
* fixed a couple bugs when adopting properties:
- removed the Property* in the PropertyEditorView base
class, and made GetProperty() virtual, as the base class
pointer was not maintained and superfluous
- delete the old PropertyObject in PropertyListView::SetTo
when adopting the properties instead of the object whose
properties were adopted...
* added SetPropertiesCommand to allow Undo/Redo on changes
of properties
* Style is also an IconObject now (TODO: yet another list view
for styles... :-)
* Style watches its Gradient for notifications and builds and
caches the color array now
* removed generating the color array for each scanline in
IconRenderer, so the performance is improved a lot
* Shape watches its Transformers for notifications in order
to trigger rerendering
* StrokeTransformers adds a bunch of properties like stroke
width, cap and join mode
* StateView keyboard filter no longer steals keydown events
from BTextViews
* PropertyItemViews resize with the parent
* refined the interface for PropertyListView for easier
tracking of the changed properties in derived classes
* added HasPendingNotifications() to Observable, so that
IconObjects can track changes more easily when adopting
a PropertyObject
* the name is now part of any IconObject


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


# 128277c9 13-Jun-2006 Stephan Aßmus <superstippi@gmx.de>

the first steps towards Icon-O-Matic
* added a framework with many classes that I think will be useful
* currently, the StateView and Manipulator interface are used to
allow editing a single VectorPath object, nothing more... the
CommandStack framework is also used to support Undo/Redo


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


# ad98c7f4aff30413e99a1853482d3b19bf0be484 25-Jul-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed warning about hiding BView::Perform().


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


# fb3e35fcec1ef41b413b3b121764509f436dee4d 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


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


# 7c4b3726d9477810a630f9c0d0604a36473df559 09-Apr-2007 Stephan Aßmus <superstippi@gmx.de>

culmulative update...
* holding down space, or using the third mouse button, will force
the "pan canvas" mode
* using the mouse wheel zooms in and out
* fixed issues with the undo commands when nudging something with
the cursor keys
* manipulators can now indicate wether they changed the mouse cursor
* ChangePointCommand is no longer inserted if the point didn't change
* new "flip" points feature in context menu, flips "in" and "out" curve
control points
* mouse wheel events are now propagated together with the mouse position
* new "UndoesPrevious" method in Command interface (used to clean up
command stack)
* clean ups in CommandStack



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


# 4fac07a0887406d944d78403f8a3b01a4e6154be 12-Nov-2006 Stephan Aßmus <superstippi@gmx.de>

* started work on saving program settins, window frame is
remembered for now
* fixed some annoying bugs:
- the snapping prevented some of the proximity checks from
working while editing a path or using the transform box,
now the Manipulators themself are responsible for mouse
snapping and can do so at the time it works best for them
- pressing the Esc key while using the transform box did
reset the transformation, but didn't exit the transform
mode (return to path editing)
* improved layout of some views when the window is resized



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


# 3ec18e87d6cfa48715a6ed10bcd03858d832093b 17-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

various GCC 4 build fixes


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


# e2a31283dde5ae5dfc14c3d2075e0d17cf392892 05-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

many improvements and bug fixes:
* added VertexSource::SetLast() used by PathSource
to call agg::path_storage::close_polygon(). The
StrokeTransformer avoids this of course. Affine
and PerspectiveTransformer forward this to their source.
* TransformerItems watch their transformers for notifications
* made VectorPath an IconObject
* VectorPath no longer uses close_polygon() when converting
to agg::path_storage to allow open strokes
* added IconObjectListView which inherits from
PropertyListView and allows to edit the properties of the
last selected object from one of the other list views
* fixed a couple bugs when adopting properties:
- removed the Property* in the PropertyEditorView base
class, and made GetProperty() virtual, as the base class
pointer was not maintained and superfluous
- delete the old PropertyObject in PropertyListView::SetTo
when adopting the properties instead of the object whose
properties were adopted...
* added SetPropertiesCommand to allow Undo/Redo on changes
of properties
* Style is also an IconObject now (TODO: yet another list view
for styles... :-)
* Style watches its Gradient for notifications and builds and
caches the color array now
* removed generating the color array for each scanline in
IconRenderer, so the performance is improved a lot
* Shape watches its Transformers for notifications in order
to trigger rerendering
* StrokeTransformers adds a bunch of properties like stroke
width, cap and join mode
* StateView keyboard filter no longer steals keydown events
from BTextViews
* PropertyItemViews resize with the parent
* refined the interface for PropertyListView for easier
tracking of the changed properties in derived classes
* added HasPendingNotifications() to Observable, so that
IconObjects can track changes more easily when adopting
a PropertyObject
* the name is now part of any IconObject


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


# 128277c969aa806add78941cd2972754c37a1572 13-Jun-2006 Stephan Aßmus <superstippi@gmx.de>

the first steps towards Icon-O-Matic
* added a framework with many classes that I think will be useful
* currently, the StateView and Manipulator interface are used to
allow editing a single VectorPath object, nothing more... the
CommandStack framework is also used to support Undo/Redo


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