XPCE is SWI-Prolog's native GUI library
Questions tagged [xpce]
45 questions
5
votes
2 answers
Example of an .exe compiled by swi-prolog that can accept arguments
I would appreciate your help after struggling 4 hours to the problem:
I need to create an exe file (on windows) from prolog script.
For example, main.pl has inside:
day(monday).
day(tuesday).
day(wednesday).
day(thursday).
day(friday). % let's…

Fibo Kowalsky
- 1,198
- 12
- 23
3
votes
1 answer
Logtalk and XPCE
Can an application be developed using both XPCE and Logtalk, or are the class systems incompatible in some way?

adamo
- 3,584
- 1
- 18
- 23
2
votes
1 answer
How to use additional fonts under XPCE in SWI-Prolog under Microsoft Windows?
SWI-Prolog includes a native GUI library -- XPCE. It makes use of a few system fonts. As detailed in the Specifying fonts section of its User Guide, it can be configured to make use of additional system fonts. The example given shows how to do…

Roman
- 1,179
- 6
- 7
2
votes
2 answers
SWI-Prolog can't find pce library
I wasted a whole day on this and can't find a solution. As Google doesn't supply any other questions like this, I'm sure that I must be doing something wrong.
I have a fresh full install of swi-prolog 8.2.3.1 on windows 10. I made sure the graphic…

vaeng
- 90
- 15
2
votes
1 answer
Reading out text from an editor in XPCE
I am writing an XPCE-program in which a user can enter a text in a text window which is then processed further by a Prolog program (say, by running a spelling check).
Thus, I would need a text window in which one can enter text freely (including…

M Carl
- 123
- 3
2
votes
2 answers
Launching PceEmacs through SWI-Prolog command line
I'd like to use the PceEmacs editor but whenever I use the command emacs., I'm met with the error code
ERROR: Undefined procedure: emacs/0 (DWIM could not correct goal). The normal built in commands seem to work as normal so I don't know if I'm…

Nathanael Payen
- 23
- 3
2
votes
1 answer
Set size and position of gui elements
I've written some code to create a GUI in swi-prolog, but my main window is too small for all my buttons and text fields. How I can draw, for example, 6th function result at the "second column", just at the right side of 1st result?
showForm :-
…

coldembrace
- 549
- 8
- 19
2
votes
1 answer
Turn off XPCE in SWI-Prolog
I'd like to get the output of apropos/1 and help/1 etc. inside my Emacs buffer, instead of an XPCE window. I'm using SWI-Prolog under Linux.
What I have tried:
Setting flags in the init file (~/.plrc):
:- set_prolog_flag(gui, false).
:-…

vukung
- 1,824
- 10
- 23
2
votes
1 answer
Display radio buttons in prolog xpce
I created a menu with Radio Buttons in XPCE prolog, but my radio buttons are showing on the same line, and I want to have each one on a separate line.
My code is the following:
new(D, dialog('title')),
send(D, size, size(500,500)),
send(D,…

Simo03
- 273
- 3
- 10
- 21
2
votes
1 answer
Animation in XPCE/prolog not smooth enough
I am trying to write a simple animation in XPCE/Prolog for a project, but it is not smooth enough; it appears flashing or flickering.
I run this on an ASUS N550jv laptop with Intel i7 (quad core, 2.4 Ghz+), so this shouldn't be a problem.
The…

riba1122
- 45
- 5
2
votes
2 answers
How to pass selection values from XPCE to generate prolog code
I want to pass the values of COD, DB, Wounds and Medical to calculate probability.
I've wrote the XPCE code as the GUI as below.
list:-
new(D,dialog('Enter Evidence')),
send_list(D,append,
[new(COD,menu(cause_of_death,choice)),
…

wana
- 21
- 2
2
votes
1 answer
XPCE for Prolog in compiled files
I have a weird problem with SWI Prolog 6.2.0 and XPCE on Unix.
When I run a prolog program, it works perfectly fine.
swipl -f file.pl
However, whenever I try and compile the same program
swipl -o launch -c file.pl
I get an error telling me that…

gintas
- 2,118
- 1
- 18
- 28
1
vote
0 answers
How can I create a pseudo-terminal in swi-prolog?
I am trying to create a terminal emulator with prolog and XPCE but I cannot find any pseudo terminal interfaces for Swi-prolog. Can anybody help?

Lambda Banquo
- 81
- 1
- 5
1
vote
1 answer
How to view images on GUI without a static path
I was wondering if it is possible to send an image in my GUI but have the path saved as a fact in my database. Instead of calling it using
resource(logo,image,image('logo.jpg')). Is it posible to call a variable inside ('logo.jpg') that will change…

Jose Gonzalez
- 63
- 1
- 4
1
vote
1 answer
Why nothing happens when I click on SUM button?
I was trying to make an interface in Prolog using XPCE. I was using Dialog Editor and it generated my code in Prolog. When I click on SUM button nothing happens, i dont understand why but I think that problem is sum clause.
dialog(zbrajanje,
[…

user10807076
- 31
- 7