Commit Graph

417 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 60a00e3551 Refactor LdDiagram selection handling methods.
Add ld_diagram_remove_selection().
2011-01-16 18:33:19 +01:00
Přemysl Eric Janouch 6854c8a643 Revert the order of LdDiagram objects.
Now they go from oldest to newest.
2011-01-16 14:33:52 +01:00
Přemysl Eric Janouch cb278a2bf1 Use properties instead of accessor methods. 2011-01-16 14:22:21 +01:00
Přemysl Eric Janouch 5124cf8d71 Basic implementation of loading.
Add an error domain for the purpose of returning errors.
2011-01-16 13:36:11 +01:00
Přemysl Eric Janouch e9da09f196 Basic implementation of saving.
When the objects are stored, ensure that they have a "type" member
that makes it possible to determine their class/purpose.
2011-01-16 12:17:51 +01:00
Přemysl Eric Janouch 1201caf8a4 Use JsonObject for LdDiagramObject parameters.
Make LdDiagramObject a regular class.
2011-01-15 17:59:07 +01:00
Přemysl Eric Janouch 9c5ade156a Make config.h.in fit between other source files. 2011-01-10 17:09:40 +01:00
Přemysl Eric Janouch 616c49a505 Make a separate library.
This is required for gtkdoc-scangobj. So far it's much like it's been
before, the main differences are that source files are in two directories
from now on and the build process has two stages.
2011-01-10 17:07:02 +01:00
Přemysl Eric Janouch 63b36a2b5b Use a central header.
$ time (make clean; make)

Before: ~8.0 seconds
After: ~8.1 seconds
2011-01-10 11:27:05 +01:00
Přemysl Eric Janouch 01d771403e Write a signature to diagram files. 2011-01-10 06:56:07 +01:00
Přemysl Eric Janouch d7c22f10d5 Fix drawing of symbol menus. 2011-01-10 05:19:32 +01:00
Přemysl Eric Janouch d785feeb82 Show names of symbols in the statusbar. 2011-01-10 04:58:32 +01:00
Přemysl Eric Janouch 09a6e91f96 Remove a FIXME.
We don't really need to set the GError to anything.
2011-01-10 04:34:24 +01:00
Přemysl Eric Janouch bd4ca0dd29 Simulate motion events when needed. 2011-01-10 04:24:16 +01:00
Přemysl Eric Janouch a3eaab63ff Draw category icons with style colors.
Previously the icons have been black in all themes.
2011-01-10 03:45:38 +01:00
Přemysl Eric Janouch 73b611a844 Add a View menu to LdWindowMain, disabled so far. 2011-01-09 13:54:20 +01:00
Přemysl Eric Janouch 10280a1949 Update category icons.
Change line width and position of shapes,
so they appear a bit sharper in the application.

Save them in plain SVG, not Inkscape SVG.
2011-01-09 13:49:55 +01:00
Přemysl Eric Janouch 1677e320a3 Add a "zoom" property to LdCanvas. 2011-01-09 08:35:40 +01:00
Přemysl Eric Janouch 9db7e667ac Add hide_terminals() to LdCanvas. 2011-01-09 08:10:20 +01:00
Přemysl Eric Janouch 01541d7c46 Add a "class" property to LdDiagramSymbol.
Also add missing gtk-doc comments
for ld_diagram_symbol_{get,set}_class().
2011-01-09 07:30:01 +01:00
Přemysl Eric Janouch 1cf5b9cd83 Make ld_lua_logdiag_register() a bit safer. 2011-01-09 07:09:18 +01:00
Přemysl Eric Janouch 54ef5ce450 Fix comments. 2011-01-09 07:08:39 +01:00
Přemysl Eric Janouch 8243114d09 Draw diagram objects in reversed order.
Previously older objects drew on top of newer ones.
2011-01-09 06:05:43 +01:00
Přemysl Eric Janouch 911fac4c2f Replace GSList with GList in LdDiagram.
This has been an unnecessary limitation.
2011-01-09 05:58:34 +01:00
Přemysl Eric Janouch 9de3a0976d Ensure that the canvas is focused. 2011-01-09 05:52:27 +01:00
Přemysl Eric Janouch 800a381129 Call bind_textdomain_codeset(). 2011-01-09 05:40:25 +01:00
Přemysl Eric Janouch 3aeedd37b6 When zooming, focus on the cursor. 2011-01-09 05:32:08 +01:00
Přemysl Eric Janouch e83cadd03b Add an inductor symbol. 2011-01-09 05:05:31 +01:00
Přemysl Eric Janouch 61ae34236a Highlight symbol terminals on mouse hover. 2011-01-09 04:50:58 +01:00
Přemysl Eric Janouch f12df021f7 Refactor queue_object_redraw(). 2011-01-09 04:41:41 +01:00
Přemysl Eric Janouch 2328058b46 Add ld_point_distance(). 2011-01-09 04:35:10 +01:00
Přemysl Eric Janouch fe996324d3 Take a better approach to drawing the grid.
If the diagram is zoomed out too much, just use bigger steps between dots.
2011-01-08 16:41:55 +01:00
Přemysl Eric Janouch 909a0352cc Don't draw the grid when it would be too narrow.
This prevents eating all the memory.
2011-01-08 12:11:08 +01:00
Přemysl Eric Janouch edd64aa132 Read terminals from Lua scripts and export them.
Also add a missing part of LdSymbol API.
2011-01-08 12:09:45 +01:00
Přemysl Eric Janouch 7ce03bac9d Make LdCanvas zoom on mouse wheel. 2011-01-08 12:05:59 +01:00
Přemysl Eric Janouch 96f7710c25 Introduce LdRectangle, LdPoint and LdPointArray.
Remove LdCanvasRect and LdSymbolArea.
2011-01-08 09:01:33 +01:00
Přemysl Eric Janouch 0b3f6503bb Add basic logical symbols (NOT, AND, OR). 2011-01-07 16:38:21 +01:00
Přemysl Eric Janouch fda123249a Export more cairo methods to Lua. 2011-01-07 16:15:58 +01:00
Přemysl Eric Janouch 6b5bae881c Update copyright years. 2011-01-07 05:13:00 +01:00
Přemysl Eric Janouch c815d0c16a Allow object selection in LdCanvas.
Refactor a part of LdCanvas in the process.
2011-01-07 04:52:44 +01:00
Přemysl Eric Janouch 1704b94650 Introduce structure LdCanvasRect.
It's basically the same as cairo_rectangle_t,
just in our own namespace.
2011-01-06 13:07:04 +01:00
Přemysl Eric Janouch 53d1de680d Change symbol clip tolerance to widget units.
As line width is in pixels, too, this makes much more sense.
2011-01-06 03:28:47 +01:00
Přemysl Eric Janouch 8eba321abe Redraw LdCanvas on LdDiagram changes. 2011-01-05 11:03:38 +01:00
Přemysl Eric Janouch 63f6feaa0e Add new objects to the start of LdDiagram's list.
This way it doesn't have to go through the whole linked list
to find a place for the objects.
2011-01-05 05:29:52 +01:00
Přemysl Eric Janouch b08217f999 Add a "selection-changed" signal to LdDiagram.
Make existing code emit this signal.
2011-01-05 04:37:42 +01:00
Přemysl Eric Janouch e92bebfa57 Add ld_diagram_{select,unselect}_all(). 2011-01-05 04:35:25 +01:00
Přemysl Eric Janouch c4b8f092b7 Export cairo_{get,set}_line_width to Lua symbols. 2011-01-05 03:56:59 +01:00
Přemysl Eric Janouch 25f1186000 Draw selected objects with another color.
Store all colors in LdCanvasPrivate and initialize them upon
object creation. This creates a base for color themes.

Make attempts to try adding an object that's not a part
of the document to the selection issue a warning.
2011-01-05 01:11:03 +01:00
Přemysl Eric Janouch fdf1ddbbb1 Move lines around. No functional change. 2011-01-04 23:05:38 +01:00
Přemysl Eric Janouch d3e5483c84 Make adding symbols to the diagram possible.
This required creating a simple framework for operations to LdCanvas.
It is probable that it's going to require some changes when other
operations are added. The basic idea behind it seems to be good, though.
2011-01-04 09:54:05 +01:00