[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Dia sheets



Le Wed, Mar 06, 2002, à 11:45:17AM +0500, Leonardo Contreras Alfonso a écrit:
> Excuse my insistence, i need to know what to do for developing an ADL sheet, 
> with popups, object specific properties and other things impossible to do with 
> simple .sheet & .shape files. It's for my grade work, and i'm late because of 
> this.

> What files i need to build (objects, shapes, sheet, pluggins, xpms)?
> What have i to change to wich Makefiles?
> How do i connect it to Dia's general structure (for eventual join distribution)?

OK, it's not the first time people are asking for this. At your first
posting, I thought it was only a matter of doing shapes and sheets, which is
a question which recurs about every month and is easily googlable.

Now, to build objects (in Dia terminology, "stuff the user can put on a
drawing which is implemented in C"), you're better off copying the source
file (in objects/ ) from an existing object similar to what's you're doing,
and tweak it to match your requirements (AVOID deriving from UML Class at
all costs ! This is the only big counter-example in the CVS version)

If you can, derive from the CVS version.

Once your object compiles, has its own name, and has a visual gimmick in its
draw() routine to visually differentiate it from its original object, create
a sheet by deriving from an existing .sheet.in file; update the Makefile.am
files to add support for your new .sheet.in (sheets/Makefile.am), and your
new object library (objects/Makefile.am, and obviously
objects/YOUR_LIBRARY/Makefile.am).

By then, you should have a clearer view of what an object really does (with
StdProp -- not much: load, save and edit props is done by the generic code.
You mostly have to handle initialisation, register your properties, draw
your object, and react to resizes. Oh, and more stuff if you implement a
middle-click menu (plenty of examples abound)).

I hope this helps; I'm ready to answer more specific questions, should they
arise, and welcome onboard !

	-- Cyrille

-- 
Grumpf.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK