Recent

Author Topic: Linux messagebox  (Read 483 times)

Key-Real

  • New Member
  • *
  • Posts: 10
Linux messagebox
« on: March 01, 2021, 04:48:24 pm »
How can i made a under X (Linux) a messagebox without using gtk or Qt?

Handoko

  • Hero Member
  • *****
  • Posts: 4160
  • My goal: build my own game engine using Lazarus
Re: Linux messagebox
« Reply #1 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

dsiders

  • Sr. Member
  • ****
  • Posts: 442
Re: Linux messagebox
« Reply #2 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.


Lazarus 2.0.12 / 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

MarkMLl

  • Hero Member
  • *****
  • Posts: 2419
Re: Linux messagebox
« Reply #3 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
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Key-Real

  • New Member
  • *
  • Posts: 10
Re: Linux messagebox
« Reply #4 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.

lucamar

  • Hero Member
  • *****
  • Posts: 3779
Re: Linux messagebox
« Reply #5 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.
« Last Edit: March 03, 2021, 10:09:43 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018