Lazarus

Programming => General => Topic started by: Key-Real on March 01, 2021, 04:48:24 pm

Title: Linux messagebox
Post by: Key-Real on March 01, 2021, 04:48:24 pm
How can i made a under X (Linux) a messagebox without using gtk or Qt?
Title: Re: Linux messagebox
Post by: Handoko on March 01, 2021, 04:57:37 pm
You can use fpGUI or CustomDrawn widgetsets:
https://wiki.freepascal.org/Widgetset

Or maybe a console-mode ShowMessage:
https://forum.lazarus.freepascal.org/index.php/topic,37425.msg251457.html#msg251457
Title: Re: Linux messagebox
Post by: dsiders on March 01, 2021, 07:57:19 pm
How can i made a under X (Linux) a messagebox without using gtk or Qt?

dialogs.pp has routines that are platform independent:

DefaultMessageBox
DefaultPromptDialog

Perhaps they're what you're looking for.


Title: Re: Linux messagebox
Post by: MarkMLl on March 01, 2021, 08:12:43 pm
How can i made a under X (Linux) a messagebox without using gtk or Qt?

What /exactly/ are you trying to do? What are you assuming is present on your X11-based system? What are you mandating should not be present? Does it have to be X11-based, or would a text-based dialog(ue) do the job as well?

MarkMLl
Title: Re: Linux messagebox
Post by: Key-Real on March 03, 2021, 08:05:58 pm
Unit Dialogs belongs to Lazarus. Need a non Lazarus Implementation.

I wanna have, Like in Windows msgbox, but for X11.
Title: Re: Linux messagebox
Post by: lucamar on March 03, 2021, 09:59:48 pm
I don't know about Pascal, but if you google for "X11 messagebox" you'll find some examples in C/C++; they might give you some ideas.

Note, though, that "X11" by itself refers only to the base libraries and protocols needed to implement a client/server windows library (kind of like the base abstract classes in LCL); you'll need a Window Manager to be able to use them. The most basic one, and IIRC the one included in the base "X11", is Motif, but it might not be installed by default in most distros nowadays.

ETA: Note also that the same is true (more or less) for Windows too; only all Windows come with their own "Window Manager" included in such a way that it seems part and parcel of the system, though it's not really so.
TinyPortal © 2005-2018