Adding shapes to dia

2010-10-25 Thread myken
Hello, I'm new to the list and I have not found an answer to my question
using google, sorry. So here it comes.

Is there a detailed tutorial on how to add sheets/shapes to dia?
This is my problem:
I like to add/change a sheet to the dia core.
So I copied the SADT.sheet.in to mySADT.sheet.in and the SADT sub-dir to
mySADT. 
Changed the file names "box.c" to "mybox.c"
Changed the references to the SADT shapes into mySADT shapes (mySADT -
fbox).
Changed the library reference (libmysadt_objects.la)
Changed the objects/Makefile.am
Changed the sheets/Makefile.am
Added "objects/mySADT/makefile to AC_OUTPUT in configure.in

Now if I run ./autogen.sh, ./configure and make all is fine (no errors).
If I start Dia (./app/run_dia.sh ) Dia runs as expected. I can even see
me sheet (mySADT) BUT there are no shapes visible. I can not select
anything.

What am I missing?

Any help is greatly appreciated.

Thanks, Robert. 



___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Adding shapes to dia

2010-10-26 Thread myken
Hello Thimo,

Yes please. If you can send me the draft version that would be great,
maybe I can even add my experience to it ;-)

Thanks.
Robert

On Tue, 2010-10-26 at 12:12 +0200, Thimo Langbehn wrote:
> Dear Robert,
> 
> > Is there a detailed tutorial on how to add sheets/shapes to dia?
> 
> there is a tutorial, however it is not yet ready for publication.
> Nevertheless, it might be of help to you even in its current state.
> If you are interested, I can send you a copy.
> 
> > This is my problem:
> > I like to add/change a sheet to the dia core.
> > So I copied the SADT.sheet.in to mySADT.sheet.in and the SADT sub-dir to
> > mySADT. 
> > Changed the file names "box.c" to "mybox.c"
> > Changed the references to the SADT shapes into mySADT shapes (mySADT -
> > fbox).
> > Changed the library reference (libmysadt_objects.la)
> > Changed the objects/Makefile.am
> > Changed the sheets/Makefile.am
> > Added "objects/mySADT/makefile to AC_OUTPUT in configure.in
> > 
> > Now if I run ./autogen.sh, ./configure and make all is fine (no errors).
> > If I start Dia (./app/run_dia.sh ) Dia runs as expected. I can even see
> > me sheet (mySADT) BUT there are no shapes visible. I can not select
> > anything.
> 
> Verify that the name in the mySADT.sheet.in (object name="XY") is the
> same as in your mybox.c (ELEMENT_NAME="XY") and that the object file for
> your shape is build.
> 
> Regards,
> 
> Thimo Langbehn
> ___
> dia-list mailing list
> dia-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/dia-list
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
> 

___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Help needed on UML Shape change (state.c)

2010-12-09 Thread myken
Hello all,

I'm trying to make a new copy of the state shape from the UML sheet.
I have managed to create my own sheet and my own shapes using some
copy-past techniques and the draft tutorial from Thimo Langbehn. So far
so good. I managed to change the line colour of the "state.c" shape (now
called mystate.c). 
Now I would like to change to position of the connection points in my
copied shape (mystate.c) but I don't get it to work.
Simply replacing the function call in line 393:
392:  /* Update connections: */
393:  element_update_connections_rectangle(elem, state->connections);
with my own function doesn't do the trick. I have no clue where to start
looking. If I look at other shapes e.g. "box.c" they are implemented
differently so I kinda got lost.

My aim is to move the connection points at the corners more closer to
the center points.

Does anyone have an idea where I should look/start?

Thanks,
Robert.




___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Adding a line style to box.c (SADT/IDEF)

2011-08-29 Thread myken


  
  
Hello,

I'm trying to add a line style (Dashed) attribute to the box.c shape
of the SADT sheet.

I tried to use the diamond.c from the flowchart as a reference but I
can't get it to work.
If I double-click on the shape I can't select the line style
attribute. 

As I understand the structure of Dia I only need to change the box.c
file, right?

As you see from the picture attached, I managed to add a source
identified attribute to the properties menu but I can't make the
line style attribute appear.

Any hint's ? Thanks a lot. Regards Robert.


  

___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Adding a line style to box.c (SADT/IDEF)

2011-08-30 Thread myken

Sorry forgot to add the code. Here it is.
In all the code I have check I never come across the PROP_FLAG_VISIBLE.

Thanks for your help.
Regards, Robert


On 30/08/11 20:27, Hans Breuer wrote:

At 29.08.2011 17:17, myken wrote:

   Hello,

I'm trying to add a line style (Dashed) attribute to the box.c shape 
of the SADT

sheet.

I tried to use the diamond.c from the flowchart as a reference but I 
can't get

it to work.
If I double-click on the shape I can't select the line style attribute.

As I understand the structure of Dia I only need to change the box.c 
file, right?



Yes.

As you see from the picture attached, I managed to add a source 
identified
attribute to the properties menu but I can't make the line style 
attribute appear.


Without the code /a patch) it is hard to guess. Maybe you are missing 
the PROP_FLAG_VISIBLE?



Any hint's ? Thanks a lot. Regards Robert.


Look at some change which works (not linestyle but color, though):

http://git.gnome.org/browse/dia/commit/?id=aeb71aca5761bcd510296893720f12b77afc4e48 



HTH,
Hans

 Hans "at" Breuer "dot" Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia




/* Dia -- an diagram creation/manipulation program
 * Copyright (C) 1998 Alexander Larsson
 *
 * SADT Activity/Data box -- objects for drawing SADT diagrams.
 * Copyright (C) 2000, 2001 Cyrille Chepelov
 * 
 * Forked from Flowchart toolbox -- objects for drawing flowcharts.
 * Copyright (C) 1999 James Henstridge.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifdef HAVE_CONFIG_H
#include 
#endif

#include 
#include 
#include 
#include 

#include "intl.h"
#include "object.h"
#include "element.h"
#include "connectionpoint.h"
#include "diarenderer.h"
#include "attributes.h"
#include "text.h"
#include "widgets.h"
#include "message.h"
#include "connpoint_line.h"
#include "color.h"
#include "properties.h"

#include "pixmaps/sadtbox.xpm"

#define DEFAULT_WIDTH 7.0
#define DEFAULT_HEIGHT 5.0
#define DEFAULT_BORDER 0.25
#define SADTBOX_LINE_WIDTH 0.10
#define SADTBOX_FG_COLOR color_black
#define SADTBOX_BG_COLOR color_white

typedef enum {
  ANCHOR_MIDDLE,
  ANCHOR_START,
  ANCHOR_END
} AnchorShape;


typedef struct _Box {
  Element element;

  ConnPointLine *north,*south,*east,*west;

  Text *text;
  gchar *id;
  gchar *sourceid;
  real padding;
  LineStyle line_style;
  real dashlength;

  TextAttributes attrs;
} Box;

static real sadtbox_distance_from(Box *box, Point *point);
static void sadtbox_select(Box *box, Point *clicked_point,
		   DiaRenderer *interactive_renderer);
static ObjectChange* sadtbox_move_handle(Box *box, Handle *handle,
	 Point *to, ConnectionPoint *cp,
	 HandleMoveReason reason, 
			ModifierKeys modifiers);
static ObjectChange* sadtbox_move(Box *box, Point *to);
static void sadtbox_draw(Box *box, DiaRenderer *renderer);
static void sadtbox_update_data(Box *box, AnchorShape horix, AnchorShape vert);
static DiaObject *sadtbox_create(Point *startpoint,
			  void *user_data,
			  Handle **handle1,
			  Handle **handle2);
static void sadtbox_destroy(Box *box);
static DiaObject *sadtbox_load(ObjectNode obj_node, int version, 
const char *filename);
static DiaMenu *sadtbox_get_object_menu(Box *box, Point *clickedpoint);

static PropDescription *sadtbox_describe_props(Box *box);
static void sadtbox_get_props(Box *box, GPtrArray *props);
static void sadtbox_set_props(Box *box, GPtrArray *props);

static ObjectTypeOps mysadtbox_type_ops =
{
  (CreateFunc) sadtbox_create,
  (LoadFunc)   sadtbox_load/*using_properties*/,
  (SaveFunc)   object_save_using_properties,
  (GetDefaultsFunc)   NULL,
  (ApplyDefaultsFunc) NULL,
};

DiaObjectType mysadtbox_type =
{
  "mySADT - myBox",  /* name */
  0, /* version */
  (char **) sadtbox_xpm, /* pixmap */

  &mysadtbox_type_ops  /* ops */
};

sta

Re: Adding a line style to box.c (SADT/IDEF)

2011-11-07 Thread myken

Hello,

I have asked this before but somehow the discussion came to an end. So 
I'll try again.


I'm trying to add a line style (Dashed) attribute to the box.c shape of 
the SADT sheet.


I tried to use the diamond.c from the flowchart as a reference but I 
can't get it to work.

If I double-click on the shape I can't select the line style attribute.

Hans, I have looked at the examples you have given me but I can't find 
the error I'm making.


I like to extent my knowledge up to a point I can contribute to Dia. So 
any help is greatly appreciated.


I added the code I tried.
In all the code I have check I never come across the PROP_FLAG_VISIBLE.

Thanks for your help.
Regards, Robert


On 30/08/11 20:27, Hans Breuer wrote:

At 29.08.2011 17:17, myken wrote:

   Hello,

I'm trying to add a line style (Dashed) attribute to the box.c shape
of the SADT
sheet.

I tried to use the diamond.c from the flowchart as a reference but I
can't get
it to work.
If I double-click on the shape I can't select the line style attribute.

As I understand the structure of Dia I only need to change the box.c
file, right?


Yes.


As you see from the picture attached, I managed to add a source
identified
attribute to the properties menu but I can't make the line style
attribute appear.


Without the code /a patch) it is hard to guess. Maybe you are missing
the PROP_FLAG_VISIBLE?


Any hint's ? Thanks a lot. Regards Robert.


Look at some change which works (not linestyle but color, though):

http://git.gnome.org/browse/dia/commit/?id=aeb71aca5761bcd510296893720f12b77afc4e48


HTH,
Hans

 Hans "at" Breuer "dot" Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia





/* Dia -- an diagram creation/manipulation program
 * Copyright (C) 1998 Alexander Larsson
 *
 * SADT Activity/Data box -- objects for drawing SADT diagrams.
 * Copyright (C) 2000, 2001 Cyrille Chepelov
 * 
 * Forked from Flowchart toolbox -- objects for drawing flowcharts.
 * Copyright (C) 1999 James Henstridge.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifdef HAVE_CONFIG_H
#include 
#endif

#include 
#include 
#include 
#include 

#include "intl.h"
#include "object.h"
#include "element.h"
#include "connectionpoint.h"
#include "diarenderer.h"
#include "attributes.h"
#include "text.h"
#include "widgets.h"
#include "message.h"
#include "connpoint_line.h"
#include "color.h"
#include "properties.h"

#include "pixmaps/sadtbox.xpm"

#define DEFAULT_WIDTH 7.0
#define DEFAULT_HEIGHT 5.0
#define DEFAULT_BORDER 0.25
#define SADTBOX_LINE_WIDTH 0.10
#define SADTBOX_FG_COLOR color_black
#define SADTBOX_BG_COLOR color_white

typedef enum {
  ANCHOR_MIDDLE,
  ANCHOR_START,
  ANCHOR_END
} AnchorShape;


typedef struct _Box {
  Element element;

  ConnPointLine *north,*south,*east,*west;

  Text *text;
  gchar *id;
  gchar *sourceid;
  real padding;
  LineStyle line_style;
  real dashlength;

  TextAttributes attrs;
} Box;

static real sadtbox_distance_from(Box *box, Point *point);
static void sadtbox_select(Box *box, Point *clicked_point,
		   DiaRenderer *interactive_renderer);
static ObjectChange* sadtbox_move_handle(Box *box, Handle *handle,
	 Point *to, ConnectionPoint *cp,
	 HandleMoveReason reason, 
			ModifierKeys modifiers);
static ObjectChange* sadtbox_move(Box *box, Point *to);
static void sadtbox_draw(Box *box, DiaRenderer *renderer);
static void sadtbox_update_data(Box *box, AnchorShape horix, AnchorShape vert);
static DiaObject *sadtbox_create(Point *startpoint,
			  void *user_data,
			  Handle **handle1,
			  Handle **handle2);
static void sadtbox_destroy(Box *box);
static DiaObject *sadtbox_load(ObjectNode obj_node, int version, 
const char *filename);
static DiaMenu *sadtbox_get_object_menu(Box *box, Point *clickedpoint);

static PropDescription *sadtbox_describe

Re: Adding a line style to box.c (SADT/IDEF)

2011-11-08 Thread myken


I'm uncertain if this should go into the offical Dia version, though. 
At least to me modifying the line style of SADT boxes looks quite 
arbitrary. Also the part you did not mention yet ("sourceid") does not 
fit my current model of SADT box [3]



Hello Hans,

I'll look into your suggestions tomorrow but I like to respond to your 
comment above right away.
It is not my intention to contribute these modifications to the SADT 
boxes into the official Dia version. I'm using the SADT shapes to get a 
better understanding of how Dia works and I personally need these 
modifications in a project I'm working on.
As soon as I have more experience with shapes and sheets I would like to 
start a new sheet/shape library or what ever it's called in Dia.

So please bear with me. Thanks.
Robert.
___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: installation unattended, silent and the Dutch language

2012-01-10 Thread myken



Hi,
I wonne install the Dia application
unattended, silent and in the Dutch language.
In the FAQ or Help I cann't find annything about it.
Please help me with this verry urgent problem.
Thanks in advance.
Bert Tobé


Hallo Bert,

Ik snap niets van je bericht. Wat is het probleem?

Groet, Robert

Translation:
Hello Bert,

I don't understand your message, what's the problem?

Bye, Robert.
___
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



GTK difference git and 0.97.3 release

2017-01-08 Thread myken

Hello List,

Sorry for the cryptic subject.
I have been trying to recompile dia from git but I get a real big 
difference in the dialog/properties windows (e.g table from the database 
sheet) between the git-compiled and the 0.97.3-compiled executable.


When I recompile from the released 0.97.3 tarball I get a really nice 
small checkbox [] for the boolean variables.
But when I recompile from git I get a big ugly on/off button in my 
properties dialog widget for the same boolean variables.


My impression is that usually the git version has the more advanced 
options, so I must be doing something wrong.
Question: how do I compile from git and still get the nice small 
checkboxes in the properties widget?


Any help is greatly appreciated.

Cheers, Robert.


___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: GTK difference git and 0.97.3 release

2017-01-10 Thread myken

Hello Hans,

On 09/01/17 20:09, Hans Breuer wrote:

Much work on Dia master was put into simplifying and reducing the code.


Yes, this is the reason I would like to use the master. It is easy to 
setup an attributes dialog. I compiled my existing code using the 0.97 
code but to be able to edit an attribute more work is needed.

So yes it is simplified but the visual appearance is not that nice.
Is this work in progress or absolutely no priority at the moment?

Second reason to use the master is that I may add my work to the dia 
repository if it is finished (and good enough).


Thanks,
Robert.


On 09/01/17 20:09, Hans Breuer wrote:


Am 09.01.2017 um 00:19 schrieb myken <mailto:my...@iae.nl>>:


Hello List,

Sorry for the cryptic subject.
I have been trying to recompile dia from git but I get a real big 
difference in the dialog/properties windows (e.g table from the 
database sheet) between the git-compiled and the 0.97.3-compiled 
executable.


Due to 
https://git.gnome.org/browse/dia/commit/?id=84630526edb8fc915809da07887b761dd3526983


When I recompile from the released 0.97.3 tarball I get a really nice 
small checkbox [] for the boolean variables.
But when I recompile from git I get a big ugly on/off button in my 
properties dialog widget for the same boolean variables.
If you want something much more similar to the 0.97.3 release you 
should not build from master, but build from the dia-0-97 branch instead.




My impression is that usually the git version has the more advanced 
options, so I must be doing something wrong.
Much work on Dia master was put into simplifying and reducing the 
code. There are also some more features, and the rendering 
infrastructure is advanced.


Question: how do I compile from git and still get the nice small 
checkboxes in the properties widget?

As said above, use the dia-0-97 branch.



Any help is greatly appreciated.

HTH,
Hans



___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



[dia-git]: table attributes, bug?

2017-01-13 Thread myken

Hello list,
While working with the sources I stumbled on, what I think is, a bug
It is easy to reproduce:
- open dia (compiled from git)
- select a table from the database sheet
- double click it (or goto properties)
- select attributes
- add an attribute, click apply.
Now you have a table with an attribute.
Than the bug:
- click remove -> the attribute disappears in the dialog screen
- click apply -> nothing happens
- click OK -> nothing happens

Basically the last attribute can not be deleted. If you have more 
attributes you can delete all but the last one.


Any thoughts on where to look for the bug/solution?

Thanks,
Robert.

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia xml format

2019-03-01 Thread myken

On 21/02/2019 19:21, Vahid Bashiri via dia-list wrote:

Hi
I'd like to use the specific xml format of Dia in my application to 
store diagrams. Because of the non GNU code I am using, I decided to 
write my own code similar to Dia which is greatly inspired by it (but 
not copied). My question is if I use the xml format, will I have a 
licencing problem. Is the file format licenced GNU too or I can use it 
in proprietary application?


Hello,

Your are obviously a software coder, so maybe you can buy some goodwill 
to use the format by contributing to make Dia even better !?!?


My $0.02 :-)

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia