English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 29 September 2016, 15:39   #1
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
GUI toolkit alternatives

Over the last few months I've been working on a pretty light weight Dock application intended to work on 3.0 or 3.1 systems. I'm a fan of BetterWB (and my most powerful real Amiga is an A2000 with and 030 and 10MB RAM) so the idea is to have something that fits in with it.

A picture of the dock as it currently looks can be seen at https://www.dropbox.com/s/tlxvb85y5v...60929.png?dl=0

Each object shown on the dock is implemented as a BOOPSI class that is responsible for rendering and responding to user actions. The object can respond to clicks, dropped workbench icons or a hotkey.

The icon button class is built in to application but the clock and memory meter in the linked image are loaded dynamically based on the config file.

One part that I haven't really decided on is the GUI for the preferences application. I'd like to have it dynamic so that each object can provide it's own config UI.

I've considered using MUI but would prefer something a bit lighter.

Are there any GUI libraries around that make it easy to add and remove gadgets to a window at run time?
bwldrbst is offline  
Old 29 September 2016, 18:18   #2
Korodny
Zone Friend
 
Join Date: Sep 2001
Location: Germany
Posts: 697
Quote:
Originally Posted by bwldrbst View Post
Over the last few months I've been working on a pretty light weight Dock application intended to work on 3.0 or 3.1 systems.
Looks nice.

Quote:
Are there any GUI libraries around that make it easy to add and remove gadgets to a window at run time?
Can't really help you with that, two somewhat popular (i.e. I occasionally encountered programs using them) alternative GUI toolkits that were more lightwight than MUI/Classact were gtlayout and BGUI, they're both on Aminet. No idea if they do what you want though.

How about just adding a context sensitive popup menu using popupmenu.library? Checkmarks for "show handlebar/clock/memmeter", an entry for adding a new object to the dock plus a bunch of options (change icon/executable/helptext, remove object etc.) for the current item? The actual requesters could then be simple ASL/gadtools affairs for entering text, picking a file etc.
Korodny is offline  
Old 29 September 2016, 18:19   #3
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,821
As you are already working with BOOPSI you might want to have a look at ClassAct:
http://aminet.net/package/dev/gui/ClassAct2Demo
http://aminet.net/package/dev/gui/classact33

The SDK is not publicly available but the examples compile smoothly with the OS 3.9 NDK if you replace all mentions of CA_ by RA_ and classact by reaction.
http://www.haage-partner.de/download/AmigaOS/NDK39.lha
thomas is offline  
Old 07 October 2016, 07:55   #4
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 57
Quote:
Originally Posted by bwldrbst View Post
Over the last few months I've been working on a pretty light weight Dock application intended to work on 3.0 or 3.1 systems. I'm a fan of BetterWB (and my most powerful real Amiga is an A2000 with and 030 and 10MB RAM) so the idea is to have something that fits in with it.

A picture of the dock as it currently looks can be seen at https://www.dropbox.com/s/tlxvb85y5v...60929.png?dl=0

Each object shown on the dock is implemented as a BOOPSI class that is responsible for rendering and responding to user actions. The object can respond to clicks, dropped workbench icons or a hotkey.

The icon button class is built in to application but the clock and memory meter in the linked image are loaded dynamically based on the config file.

One part that I haven't really decided on is the GUI for the preferences application. I'd like to have it dynamic so that each object can provide it's own config UI.

I've considered using MUI but would prefer something a bit lighter.

Are there any GUI libraries around that make it easy to add and remove gadgets to a window at run time?
Looks good, already. I'd love to see animation support (like Toolmanager 2.1). Also, variable size tiles might be worth a thought.
buggs is offline  
Old 07 October 2016, 15:50   #5
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
So I've been playing around a bit with Triton as it appears to be just a light wrapper around gadtools and boopsi gadgets. The preferences editor is currently looking like this:

Click image for larger version

Name:	dockbot_20161007.png
Views:	275
Size:	6.1 KB
ID:	50326

The plan is to have it support dropping of icons and displaying of icons in the prefs editor.

I'll probably change the dock to support tiles the same size as the icons. Simple animation is possible as each gadget in the dock receives a TICK message several times a second and can request a redraw at that time. This is used to display the icon's alternate image when it is clicked:

Click image for larger version

Name:	dockbot_20161007_2.png
Views:	169
Size:	4.4 KB
ID:	50327

I've run into a couple of gotchas with Triton: it doesn't seem to deal with TagItem lists in the intended way and won't work if you're trying to append tags using TAG_MORE. Also, even though it provides a way to display a BOOPSI image within the UI there doesn't seem to be a way to actually access the image instance (to, for example, hand my custom image class an icon to render) so unless I'm missing something I'm not sure what use it is.
bwldrbst is offline  
Old 19 June 2019, 18:09   #6
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
Old thread, but I wonder if this Dock app was ever completed and if it can be found on Github or something?
hth313 is offline  
Old 19 June 2019, 18:21   #7
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 4,893
Quote:
Originally Posted by hth313 View Post
Old thread, but I wonder if this Dock app was ever completed and if it can be found on Github or something?

https://github.com/adkennan/DockBot
AMIGASYSTEM is offline  
Old 19 June 2019, 19:26   #8
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
Quote:
Originally Posted by AMIGASYSTEM View Post
Cool, thanks!
hth313 is offline  
Old 20 June 2019, 01:19   #9
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
Wow, that's interesting timing... I got distracted working on something else and never got around to tidying this up for release. I've been using it myself for years though.

Over the last couple of weeks I've picked it up again and have been getting it ready - fixing a couple of bugs, writing a manual and an installer. I'll hopefully upload it it Aminet in the next day or so.
bwldrbst is offline  
Old 20 June 2019, 04:11   #10
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
Nice, please consider making a release at github as well, and thank you for putting it on github in the first place.
hth313 is offline  
Old 20 June 2019, 15:18   #11
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
Quote:
Originally Posted by hth313 View Post
Nice, please consider making a release at github as well
Done!

Quote:
Originally Posted by hth313 View Post
and thank you for putting it on github in the first place.
You're welcome. The more source code available, the better
bwldrbst is offline  
Old 20 June 2019, 21:47   #12
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
I hope it is OK to request support here...

It will not start as it wants
parm.library
which is included in the
.lha
, but not installed into
libs:
or the place it installs DockBot, it seems.

Fixing that (assignd add
libs:
) and it does not start for me, but that might be due to my setup. I use AROS and do not launch any workbench (replacement), there is a screen called Workbench without anything particular on it and a shell window. What I want to do is to use DockBot as part of a desktop setup without any WB replacement, to get a useful and lightweight setup.

Launching
DockBotPrefs
results in a "Couldn't load config." requester and termination. There is a
DockBot.prefs
file in both
ENV:
and
ENVARC:
.

Regarding the icon library, I tried both the one that comes with AROS and the one in icon library 46 (I just copied the icon.library for 68020 and renamed it). Maybe it is my environment here and I do not know how to debug this in a good way.
hth313 is offline  
Old 20 June 2019, 21:50   #13
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
Quote:
Originally Posted by bwldrbst View Post
You're welcome. The more source code available, the better
hth313 is offline  
Old 21 June 2019, 00:38   #14
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
Quote:
Originally Posted by hth313 View Post
I hope it is OK to request support here...
That's fine. I knew it wouldn't work!

Quote:
Originally Posted by hth313 View Post
It will not start as it wants
parm.library
which is included in the
.lha
, but not installed into
libs:
or the place it installs DockBot, it seems.
Doh.

Quote:
Originally Posted by hth313 View Post
Fixing that (assignd add
libs:
) and it does not start for me, but that might be due to my setup. I use AROS and do not launch any workbench (replacement), there is a screen called Workbench without anything particular on it and a shell window. What I want to do is to use DockBot as part of a desktop setup without any WB replacement, to get a useful and lightweight setup.
I've not tried it on AROS at all.

Quote:
Originally Posted by hth313 View Post
Launching
DockBotPrefs
results in a "Couldn't load config." requester and termination. There is a
DockBot.prefs
file in both
ENV:
and
ENVARC:
.
Strange. It might be masking the real error.

Quote:
Originally Posted by hth313 View Post
Regarding the icon library, I tried both the one that comes with AROS and the one in icon library 46 (I just copied the icon.library for 68020 and renamed it). Maybe it is my environment here and I do not know how to debug this in a good way.
Can you see if the v46 icon library is being loaded and used?

Thanks,

Andrew
bwldrbst is offline  
Old 21 June 2019, 01:59   #15
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
I used SnoopDos on DockBotPrefs with the following result
Code:
Count Process Name       Action     Target Name                 Options Res.                                                                                                                     ?·························
----- ------------       ------     -----------                 ------- ----                                                                                                                     ?·························
1     [1] DockBotPrefs   OpenLib    intuition.library           Ver 0   OK                                                                                                                       ?·························
2     [1] DockBotPrefs   OpenLib    PROGDIR:dockbot.library     Ver 1   OK                                                                                                                       ?·························
3     [1] DockBotPrefs   OpenLib    triton.library              Ver 2   OK                                                                                                                       ?·························
4     [1] DockBotPrefs   Open       env:Triton/DockBotPrefs.app Write   OK                                                                                                                       ?·························
5     [1] DockBotPrefs   Open       env:Triton/DockBotPrefs.tri Read    Fail                                                                                                                     ?·························
6     [1] DockBotPrefs   Open       env:Triton/__GLOBAL__.tri   Read    Fail                                                                                                                     ?·························
7     [1] DockBotPrefs   OpenLib    utility.library             Ver 37  OK                                                                                                                       ?·························
8     [1] DockBotPrefs   Open       env:Triton/DockBotPrefs.win Read    OK                                                                                                                       ?·························
9     [1] DockBotPrefs   OpenFont   topaz.font                  Size 8  OK                                                                                                                       ?·························
....                                                                                                                                                                                             ?·························
43    [1] DockBotPrefs   OpenFont   topaz.font                  Size 8  OK                                                                                                                       ?·························
44    [1] DockBotPrefs   Open       ENV:DockBot.prefs           Read    OK                                                                                                                       ?·························
45    [1] DockBotPrefs   OpenLib    PROGDIR:Gadgets/DockClock.c Ver 1   OK                                                                                                                       ?·························
46    [1] DockBotPrefs   OpenLib    PROGDIR:Gadgets/DockMem.cla Ver 1   OK                                                                                                                       ?·························
47    [1] DockBotPrefs   OpenLib    PROGDIR:Gadgets/DockButton. Ver 1   Fail                                                                                                                     ?·························
Starting DockBot itself gives the following output:

Code:
Count Process Name       Action     Target Name                 Options Res.                                                                                                                     ?·························
----- ------------       ------     -----------                 ------- ----                                                                                                                     ?·························
1     [1] execute        Open       DockBotStart                Read    OK                                                                                                                       ?·························
2     [1] AROS:Tools/Doc OpenLib    parm.library                Ver 9   OK                                                                                                                       ?·························
3     [1] AROS:Tools/Doc OpenLib    locale.library              Ver 38  OK                                                                                                                       ?·························
4     [1] AROS:Tools/Doc ChangeDir  AROS:Tools/DockBot                                                                                                                                           ?·························
5     [1] AROS:Tools/Doc Open       DockBot.info                Read    OK                                                                                                                       ?·························
6     [1] AROS:Tools/Doc ToolType   CLI                                 Fail                                                                                                                     ?·························
7     [1] AROS:Tools/Doc ToolType   TOOLPRI                             Fail                                                                                                                     ?·························
8     [1] AROS:Tools/Doc ChangeDir  AROS:Tools/DockBot                                                                                                                                           ?·························
9     [1] AROS:Tools/Doc ChangeDir  AROS:Tools/DockBot                                                                                                                                           ?·························
10    [1] AROS:Tools/Doc Load       DockBot                             OK                                                                                                                       ?·························
11    [1] AROS:Tools/Doc ChangeDir  AROS:Tools/DockBot                                                                                                                                           ?·························
12    DockBot            ChangeDir  AROS:Tools/DockBot                                                                                                                                           ?·························
13    DockBot            OpenLib    icon.library                Ver 0   OK                                                                                                                       ?·························
14    DockBot            Open       con:10/10/320/80/DockBot/au Write   OK                                                                                                                       ?·························
15    DockBot            Open       *                           Read    OK                                                                                                                       ?·························
16    DockBot            FindPort   DockBot                             Fail                                                                                                                     ?·························
17    DockBot            OpenLib    PROGDIR:dockbot.library     Ver 1   OK                                                                                                                       ?·························
18    DockBot            OpenLib    graphics.library            Ver 39  OK                                                                                                                       ?·························
19    DockBot            OpenLib    layers.library              Ver 39  OK                                                                                                                       ?·························
20    DockBot            OpenLib    intuition.library           Ver 39  OK                                                                                                                       ?·························
21    DockBot            OpenLib    gadtools.library            Ver 39  OK                                                                                                                       ?·························
22    DockBot            OpenLib    workbench.library           Ver 39  OK                                                                                                                       ?·························
23    DockBot            OpenLib    commodities.library         Ver 39  OK                                                                                                                       ?·························
24    DockBot            OpenDev    timer.device                Unit 1  OK                                                                                                                       ?·························
25    DockBot            Open       ENV:DockBot.prefs           Read    OK                                                                                                                       ?·························
26    DockBot            OpenLib    PROGDIR:Gadgets/DockClock.c Ver 1   OK                                                                                                                       ?·························
27    DockBot            OpenLib    PROGDIR:Gadgets/DockMem.cla Ver 1   OK                                                                                                                       ?·························
28    Lib & Dev Loader D OpenLib    intuition.library           Ver 39  OK                                                                                                                       ?·························
29    Lib & Dev Loader D OpenLib    dockbot.library             Ver 1   OK                                                                                                                       ?·························
30    Lib & Dev Loader D OpenLib    graphics.library            Ver 37  OK                                                                                                                       ?·························
31    DockBot            OpenLib    PROGDIR:Gadgets/DockButton. Ver 1   Fail                                                                                                                     ?·························
32    Intuition menu han OpenFont   topaz.font                  Size 8  OK                                                                                                                       ?·························
33    Intuition menu han OpenFont   topaz.font                  Size 8  OK
hth313 is offline  
Old 21 June 2019, 08:05   #16
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
So it turns out that I did not have the correct icon library. AROS provides version 44 and the button gadget class requires 45, so it stops without saying anything.

I tried LoadResource on the v45 icon library, but it was a no go. Instead I built a new kickstart without icon.library, to allow it to load the v45 one from
libs:
.

This made the prefs tool work. DockBot itself does not start as it expects to find
System:
and I do not have that. It think it should be
SYS:
?

I added an assignment to solve that and then it crashes randomly. Sometimes the dock comes up, but trying to start a shell causes a "Corrupt memory list detected" error, but the shell comes up. Sometimes it just crashes when starting DockBot itself.

That prefs tool look quite tidy, I think this Triton is good?

Last edited by hth313; 21 June 2019 at 08:20.
hth313 is offline  
Old 21 June 2019, 11:04   #17
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
Awesome, thanks for your help.

The reference to "System:" is actually in the default prefs file. I'll change it to SYS:. It's a text file so you can edit it yourself.

The corrupt memory list bit is a worry. I wonder if I'm doing something dumb that hasn't affected me but AROS doesn't like.

Triton seems pretty neat. It's kind of MUIish wrapper around Gadtools and existing BOOPSI classes, I think. It's certainly much lighter than some of the alternatives.
bwldrbst is offline  
Old 21 June 2019, 17:02   #18
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
I've created a new release and actually tried running it on a fresh 3.1 install with just icon.library.

I still can't promise it will work on AROS but if you can get me a minimal setup of it that I can run in fs-uae I can try to work out what's going on.

Cheers,

Andrew
bwldrbst is offline  
Old 21 June 2019, 19:01   #19
hth313
On strike for kolla
hth313's Avatar
 
Join Date: May 2018
Location: Delta, Canada
Posts: 185
The new release works great. No crashes here as I played around with it. Many thanks!

I will see how I can incorporate it into my setup here as I am just starting out to create a custom work environment (to replace the Workbench). I am developing a tool to allow me to open and handle multiple public screens dynamically. Do you think it would be simple to extend DockBot to exist on multiple (public) screens?

In the source
DB_METHOD_DM(EDITORUPDATE, DockMessageEditorUpdate)
allocates memory chunks for strings without checking that it got a valid pointer back.
hth313 is offline  
Old 22 June 2019, 01:51   #20
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 31
That's good to hear, I'm glad it works for someone other than me!

Thanks for pointing out the potentially dangerous allocations. I've had a quick look and there's a couple more scattered about the place.
bwldrbst is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Your thoughts on Minimig? Alternatives? appiah4 support.Hardware 20 17 April 2016 19:10
Alternatives to DiskLED Leandro Jardim request.Apps 3 05 July 2013 21:23
EasyAdf Alternatives? Gordon Retrogaming General Discussion 9 25 April 2009 19:16
Kumiko GUI - Amiga Workbench 3.1 GUI for Windows milika Amiga scene 31 18 April 2007 19:16
Alternatives to ClassicWB DDNI New to Emulation or Amiga scene 5 14 August 2006 16:03

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09870 seconds with 16 queries