Making interactive displays: A problem in drawing controls

Discussions related to Visual Prolog
Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Making interactive displays: A problem in drawing controls

Unread post by Eki » 18 Jan 2010 21:21

Hi,
I am about to program interactive displays such as fish-eye-diagrams. There is one sample here: http://www.aisee.com/graph_of_the_month/svg.htm.

Earlier I have programmed graphics using Wingraphviz and SVG and html, but they are not interactive enough.
When trying to use Visual Prolog controls, I found a problem.

I have a form as a background as in the sudoku example of Vip (http://www.visual-prolog.com/vip/exampl ... sudoku.htm).

This works in the generatedInitialize part of the form and draws the control correctly:
oma_ctl := omacontrol::new(This),
oma_ctl:setPosition(20, 8),
oma_ctl:setSize(200, 68),

Then I tried to add a new control (here omacontrol) in the program:

1 addOmaControl():-
2 owncontrol := omaControl::new(This),
3 owncontrol :setPosition(100, 40),
4 owncontrol :setSize(100, 100),
5 DrawWindow = owncontrol :getDrawWindow(),
6 DrawWindow:invalidate(),
7 !.

However, the line 6 doesn't activate the corresponding onPaint-clause.
Is there a simple reason, why not? Instead, the control oma_ctl activates. What is the difference?

I have tested it by Vip 7.0 and 7.1 with the same results.

PS. Has anybody a demo for drawing graphs using VIP controls?

Thank you for help!
Erkki L

Steve Lympany
VIP Member
Posts: 695
Joined: 31 Mar 2001 23:01

Unread post by Steve Lympany » 18 Jan 2010 22:20

Hi,
I just had a very quick scan of your paper:

http://www.symbolicanalysis.net/Info/Ph ... alysis.pdf

Have you done any work in safety-critical software (eg SIL4), or are the approaches for that too formal for what you are doing?

Have you seen Chan Bok's work?
http://discuss.visual-prolog.com/viewtopic.php?t=8158

cheers
Steve

User avatar
Thomas Linder Puls
VIP Member
Posts: 2448
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 18 Jan 2010 22:42

Hi, Erkki. If you add the control after the form is created you must remember to call its show predicate.

Controls that are added before the form is created are automatically shown, when the form is shown.

new creates the control object; show creates the actual "Windows control".
Regards Thomas Linder Puls
PDC

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 19 Jan 2010 8:28

Thomas Linder Puls wrote:Hi, Erkki. If you add the control after the form is created you must remember to call its show predicate.

Controls that are added before the form is created are automatically shown, when the form is shown.

new creates the control object; show creates the actual "Windows control".
Thank you, Thomas!

It is a really logical answer. Even nested controls work fine as I assumed. Now I can continue.

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 19 Jan 2010 8:40

Steve Lympany wrote:Hi,
I just had a very quick scan of your paper:

http://www.symbolicanalysis.net/Info/Ph ... alysis.pdf

Have you done any work in safety-critical software (eg SIL4), or are the approaches for that too formal for what you are doing?

Have you seen Chan Bok's work?
http://discuss.visual-prolog.com/viewtopic.php?t=8158

cheers
Steve
Symbolic analysis (SAM) is capable of expressing perfectly any formal types and data that can be ground. It means how to define the corresponding type system - here using Visual Prolog domains.
If you can formulate your work in Vip, you can use SAM for analyzing all info in it.

SAM is ideal for creating reliability models, or for creating theorem provers to match the underlying model.

I have used as the lowest level the definition of value in the core package.

I remember Chan Bok from St.Pertersburg. Perhaps I can ask for him more about ideas for a three dimensional fish-eye.

Thank you, Steve!

Gildas Menier
VIP Member
Posts: 78
Joined: 8 Jun 2004 23:01

Unread post by Gildas Menier » 19 Jan 2010 9:48


User avatar
Thomas Linder Puls
VIP Member
Posts: 2448
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 19 Jan 2010 9:58

Regards Thomas Linder Puls
PDC

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 19 Jan 2010 10:29

Gildas Menier wrote:Hi Eki,

is this what you are looking for ?

http://www.arsaniit.com/en/prolog-tools ... /hypertreehttp://www.epo.org/patents/law/legal-te ... /ar52.html
)

Gildas
Hi Gidas,
your hypergraph ha an interesting point-of-view. For me too there is a root in the center of the screen. There are some input subtrees and some output subtrees in both principles.

However, my purpose is to draw the elements heuristically, their position has a certain meaning in the whole. Therefore, there is no need to struggle with patent issues.

Your displays are really fascinating.

Please, inform me whether your code is avaible.
Regards Eki

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 19 Jan 2010 10:38

Hi Thomas,
that sounds interesting.

My purpose is to show a scrollable virtual screen about a source code model that can be large, but it should be filtered according to user wishes.

There are some needs similar to your Denmark map -demonstration. An addition is how to simulate the model, because it adds new information. There is a technology called mashups: http://en.wikipedia.org/wiki/Mashup_%28 ... _hybrid%29. Has your package something in common with mashups?
Is it possible to use controls as the main symbols in that coming package?

B.r. Eki

User avatar
Thomas Linder Puls
VIP Member
Posts: 2448
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 19 Jan 2010 11:35

No, I don't think our new package has much in common with mashups.

Our new package is a Visual Prolog version of Windows GDI+, though not fully complete.
Regards Thomas Linder Puls
PDC

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 22 Jan 2010 14:33

Thomas Linder Puls wrote:No, I don't think our new package has much in common with mashups.

Our new package is a Visual Prolog version of Windows GDI+, though not fully complete.
Ok. I have had much success when using controls in order to create a visual interactive symbolic Turing machine. However,
there were one bug related to a combination

Code: Select all

Pen = myGDIObject:getPen(),  ....  myGDIObject:setPen(Pen)
.
I used Vip 7.0 for that. Perhaps you have identified the problem.

How can I create animation best?
One symbol could walk across the display.

User avatar
Thomas Linder Puls
VIP Member
Posts: 2448
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 22 Jan 2010 19:21

Have you reported that problem to us? I do not recall anything like that.

As for the use of GDI+ I am afraid that I cannot help you, I have never used it myself.
Regards Thomas Linder Puls
PDC

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 23 Jan 2010 19:17

Thomas Linder Puls wrote:Have you reported that problem to us? I do not recall anything like that.

As for the use of GDI+ I am afraid that I cannot help you, I have never used it myself.
Ok. I am doing well. After checking the setPen-problem, I will inform about a bug if it is the case.

Post Reply