XPCE is SWI-Prolog's native GUI library
Questions tagged [xpce]
45 questions
1
vote
0 answers
SWI-Prolog integrate with XPCE Gui
so I'm working on an SWI-Prolog code, basically this search_restaurant will give names of restaurant with the criteria given.
So if I execute
search_restaurant(500,300,9,7500,seafood,knowledge_based,X).
result:
seafood restaurant with coord 500,…

kalista lanti
- 11
- 3
1
vote
1 answer
Looking for a XPCE tutorial
I'm going to write a simple animation in XPCE (four glasses puzzle to be precise). I know absolutely nothing about XPCE so I looked up a tutorial but the results are disappointing. Could anyone point me to some materials on the following:
working…

Igor
- 2,673
- 5
- 33
- 39
1
vote
1 answer
Change database via GUI in XPCE
1) How I can change my database (facts) using buttons and text fields in XPCE? For example, I have a set of…

coldembrace
- 549
- 8
- 19
1
vote
1 answer
Prolog XPCE: Text Labels for Connections
In XPCE, graphical objects can be connected with the Connection class (see Chapter 5.3. in the manual).
Is there an easy way to attach text labels to connections?

ftl
- 647
- 3
- 13
1
vote
0 answers
Prolog XPCE button message
% Author:
% Date: 02/04/2015
:- use_module(library(pce)).
dialog('screen1',
[ object :=
Screen_,
parts :=
[ Screen_ := dialog('Screen1'),
Button1 := button(button),
…

trent
- 33
- 4
1
vote
0 answers
how to improve simple prolog login?
I am building my first project in swi-prolog.It is an expert system that guess user identification base on the input of the user. This of the code produces a dialog that allows a user to enter information, then verifies the information and allows…

lostForAWHile
- 290
- 3
- 15
1
vote
1 answer
Overview about a Prolog project
I've written a bigger project in (SWI-)Prolog. For a better overview about the predicates and the relationships between them, I'm searching for a functionality to illustrate that.
At the XPCE extension (command "manpce") there is an overview about…

mrbela
- 4,477
- 9
- 44
- 79
1
vote
1 answer
How can I make a bar chart (bar graph) in Prolog GUI (XPCE) programming?
I'm trying to make a barchart by using XPCE in Proglog libraries. Though I found some materials but I cannot execute it right away.
The code is as below.
barchart :-
barchart(vertical).
barchart(HV) :-
new(W, picture),
…

GoodGJ
- 339
- 1
- 4
- 17
1
vote
0 answers
Dynamic interactive line/bezier curve in XPCE Prolog
My task is to connect in xpce prolog two squares, each of which equipped with a move_gesture, with a line/bezier curve in such a way that the line is moved along with the objects; does anyone know how this can be done or whether this is possible?

MirrorMan
- 13
- 3
1
vote
0 answers
XPCE menu - fixed width
This is my code:
listaw:-
new(SS, dialog('Rekordy w bazie wiedzy')),
send(SS, display, new(W3,text('Nazwy komponentów'))),
new(M,menu(von,cycle)),
findall(B,failure(B,_,_),Y),
send_list(M, append, Y),
send(SS,open).
I want to make a…

Przemek
- 71
- 1
- 1
- 4
1
vote
0 answers
Prolog - XPCE interface running as .exe file
Is it possible to create an interface in XPCE for the program written in PROLOG language. Compile it once and then run as a .exe file, without an SWI prolog console? I am working on MS Windows system.

Przemek
- 71
- 1
- 1
- 4
1
vote
1 answer
How to connect a button to a function in xpce/prolog
This is a button:
new(B,button(solve, message(@prolog, solve))),
send(D,display,B),
send(D, open),
This is a function:
solve(D, Row, Column) :-
assert(path([[0, 0], [-1, 0]])),
track(Row, Column),
path(P),
…

Boss Kittiprasert
- 11
- 3
1
vote
1 answer
how to create a button to do some function in xpce/prolog
?- new(B, button(hello,
message(@pce, write_ln, hello))).
In xpce/prolog, this the way to create a button to print a sentence
is there any way that when i click a button i want to do some function, please help!

Anon Purachaka
- 11
- 1
- 4
0
votes
0 answers
How to pass values through XPCE button and run a function?
I have a function that calculates all possible outcomes to a given equation in a given range. It needs 4 values that can be ints or unknown. I am trying to add some kind of GUI to let user input those values and get a result. I am not able to get…

Strawberry Goat
- 1
- 1
0
votes
0 answers
XPCE Prolog GUI
I am working on my first prolog - GUI with XPCE consisting of 10 columns of text items.
However, not all elements of the GUI can be seen: The right two columns are cut off!
I tried adjusting the dialog size, but the size of the dialog does not…

Dinhosaur
- 11
- 2