Your GUI design?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
mystran

Your GUI design?

Post by mystran »

Ok, and once you've selected among those, maybe add some more information if you bother... like are you planning for remote desktops (and if so, do you support moving applications from one console to another?), are you going to have standard widget set in you GUI server (or equivalent), or maybe in a standard application library?

Personally, I'm currently drafting a vector-based, somewhat PDF (or SVG) like "painter's model" system, which would form a standard GUI library. Whether it's going to do drawing on the server or on the client is still open, but basicly the idea is to provide something similar to Quartz in MacOSX; everything can be scaled and rotated. If drawing is done on server side, this also has lots of potential for really good looking applications, that still run fast over slow networks. Even the most simple parts of the application logic could be run on the server, leading to something a little like Flash; the GUI you see is a simple applet running on the server, and it can query the real application when it needs to do something fancy.

But what are others doing?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Your GUI design?

Post by distantvoices »

Currently I've got a split approach: the applications know nothing about how to draw gui elements, they just tell the gui service: I want a window. I want a button. I want a menu. i want a text control. I want a grid layout. You get the point.

the server builds the window, does the drawing and processes the serverside doings of the events ere it passes the event forth to the client. the client can register callbacks for different sorts of events. It's rather straight forward in BlueIllusion. I've somewhat got inspiration from Java Swing.

I want to have a possibility to expose the framebuffer alongside with a list of clips (visible regions) directly to the client too - for animations and other client-side drawn stuff I don't want to put inside the service.

Currently there is no hardware acceleration (that's not really a problem yet).
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Dex4u

Re:Your GUI design?

Post by Dex4u »

I am going to go along the lines of a simple non resize able window, that have a menu type user chose, like you would have in a i-pod.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Your GUI design?

Post by Brendan »

Hi,

I'll be having 12 "screens" for each user, where ALT+F1 to ALT-F12 selects which screen. Any screen can be used for a single application, a CLI or a GUI. A GUI will use ALT+TAB to switch between applications, so a user could have 10 GUIs with 10 applications in each GUI and 2 applications using the whole "screen" by themselves (for e.g.).

There's a "User Interface Protocol" that is used by everything so that an application doesn't have to care whether it's using a screen or a GUI. This protocol has 4 modes for video - ASCII TTY, Unicode TTY, raw and scripting. ASCII TTY and Unicode TTY are similar to "stdout" and "stdin". For raw mode the application sends pixel data only. For scripting the application sends scripts containing commands (draw a box here, put this text there, draw a textured 3D polygon over there).

There's also 3 modes for input devices - TTY, raw and scripted. For TTY mode the application receives ASCII & Unicode characters from the keyboard (and mouse using cut & paste) only. TTY input is the only input mode allowed for applications that use ASCII TTY and Unicode TTY output.

In raw mode the application receives packets of information for keyboard, mouse, etc. In scripted mode the application specifiies "active regions", which results in events beng received rather than raw packets. An application that uses raw video output or scripted video output can use any mode for input. If scripted input and scripted video is used they are combined into a single script.

The user interface protocol also allows applications to be moved between screens and GUIs (sort of like KDE's "to desktop"). This will allow an application or GUI to be sent to an unused screen, to any GUI, to a different user or to a different computer.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Candy
Member
Member
Posts: 3883
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Your GUI design?

Post by Candy »

Dual-mode actually, but MT won't let me vote twice (no, not even mods can do that :)). On one hand there's the default interface that uses rasterized *everything* for speed, and on the other hand there's the polygonized version that does everything with polygons with high-res textures. Implemented using an abstract factory (yes, I've recently had design patterns :)) they can be switched at runtime, I was thinking about making the objects themselves polymorph through handles, as in, they know their handle and can instantiate a different version of themselves to then replace themselves with it.

Result would be a framework that I can change dynamically and fix up in any way I like to, and even make runtime switchable to any different one, without any sort of problem.

Uhm... for the window edge design, don't ask. Haven't even begun to think about the look of it :)

The fonts will use a prerendered format where they are rendered to a 16x screen (as in, 4x the normal size in both directions) and then shrunk back encoding the rest of the information as shades. Then, it's converted where white is transparent and black is completely opaque and that's stored to draw with a given color.

Yes, I've tried that method and it works. No, QBASIC didn't like it :D
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Your GUI design?

Post by Pype.Clicker »

i may wish something too complicated, but ...

The idea is to pass interpretable messages to the server. It does more than a SVG/PDF interface and will probably look like if the GUI server was a Flash renderer ;)

The server knows a few "basic" objects such as text renderers, pixmap renderers and the like. What you send it is a description of how the widget should be rendered *plus* a description of how events should be locally processed and filtered by that widget.

For instance, you could send a description of a 'combo list' object that will receive XML/bencoded datas on a stream and that retain which entries were selected. You can then combine that combolist in a 'frame' description so that when clicking on the nextby "ok" button, it will notify the application of selected objects.

Code: Select all

window mySelector {
    my @vals;
    list: comboList (values=@vals) @west;
    ok: button (label="Ok") @east;
    on ok.clicked {
       send list.selected();
    }
}
That being said, the system will probably favour a few fonts and fontsize, thus most of the text will be using pre-rasterized characters (generated on-demand and then cached)...

More of the expected design can be found here
KieranFoot

Re:Your GUI design?

Post by KieranFoot »

The nexzt version of my os will include basic network functions so i will be using a basic console to send test data accross a network.
eg. Test FTP and such.
User avatar
Solar
Member
Member
Posts: 7635
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Your GUI design?

Post by Solar »

It's not really fair that I selected "something even fancier" as Pro-POS is discontinued, but we did draft the concept of "UI modules", whereas the abstraction is on the message level, not the graphical one. The idea was to allow a sensible set of applications to use whatever was available - serial terminal, xterm-like graphical shell, 2D desktop, "Looking Glass" 3D environment, braille terminal, cranial interface...

Of course, that does only go so far. You can't port Photoshop to the braille terminal. (Hmmm... you can port it's script interface to it, though.)
Every good solution is obvious once you've found it.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Your GUI design?

Post by distantvoices »

And I'd have bet that you'd write something about AmigaOS & the workbench and how amigaOS has handled windows and sorta :-)
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Solar
Member
Member
Posts: 7635
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Your GUI design?

Post by Solar »

:P

More like, how every application worth it's bucks had an ARexx port and could be "remote controlled" from a script.

Come on, I'm not that hardliner about it anymore. (Although I still think locales, datatypes and assigns are nice concepts. :-\ )
Every good solution is obvious once you've found it.
mystran

Re:Your GUI design?

Post by mystran »

Pype.Clicker wrote: i may wish something too complicated, but ...

The idea is to pass interpretable messages to the server. It does more than a SVG/PDF interface and will probably look like if the GUI server was a Flash renderer ;)
This doesn't sound too far removed from what I have in mind, although I basicly though of simple scripts for states, and allow messages to be sent to real application on events, while simultaneously internally jumping to another state.

The basic idea is, that (say) playing around with your regular push-button using mouse is just a series of events, and transitions from a state to another in a finite state machine, with different rendering (pushed down, normal, under mouse) associated with each state. The transitions don't even need stack, although for drawing vectors a stack-machine would be nice. :)

Oh, and I actually thought I was going to rasterize the whole window again on every redraw. I have a few ideas of how to do this fast (although I think I'm going to drop my plans of exact handling of beziers, and approximate them with line-segments like everyone else... oh well).
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Your GUI design?

Post by Pype.Clicker »

hmm. That use of machine states is interresting. I dunno if all i plan to allow would be enough, but that would certainly capture popup menus, button states and the like.

I finally figured out that practical server-processing of events would require applications to send lists of variable lenght (for treeview, combolist and many other widgets) .. possibly containing structured items. I first thought of XML for that purpose, but after a bit of BitTorrent programming, the BeEncoding could fit the needs too:

Code: Select all

({name:"kernel.c", size: 1234, stamp:"Sat 19 17:32:40 EST}, 
 {name:"kernel.h", size: 234, stamp: "Fri 18 13:37:00 EST},
)

<filelist>
   <fileitem name="kernel.c" size="1234" stamp="..."/>
   <fileitem name="kernel.h" size="1234" stamp="..."/>
</filelist>

ld4:name8:kernel.c4:sizei1234e5:stamp14:Sat 19 17:32:40 ESTed4:name8:kernel.h4:sizei234e5:stamp14:Fri 18 13:37:00 ESTee
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Your GUI design?

Post by Pype.Clicker »

just to let you know i described a bit my idea of the ConsoleRenderer on my Wiki ...
SANiK

Re:Your GUI design?

Post by SANiK »

Well, here is what xsism wanted Halfix to do:

Code: Select all

<window name="main" title="demo window" status="Demo App" width="200" height="200" sx="40" sy="40">
   <menu name="top bar">
      <mr>
         <md name="app" title="app">
         <md name="help" title="help">
      </mr>
   </menu>
   <body name="top" title="top body"></body>
   <hr>
   <body name="bottom" title="bottom body"></body>
</window>
which would in turn create:

[tt]
----------------------------------------------------------------------
| demo window [_][ # ][ X ] |
----------------------------------------------------------------------
| . app . help . |
|--------------------------------------------------------------------|
| |
| top body |
| |==============================================================| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| |==============================================================| |
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|
| |
| bottom body |
| |==============================================================| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| |==============================================================| |
| |
| |
|--------------------------------------------------------------------|
| Demo App |
|--------------------------------------------------------------------|
[/tt]

The HTML like script gets converted to byte code and becomes an array which the programmer will pass to the GUI.
The names for the widgets are all listed in a Header file that the converter will output. So if you want to move the window, it'll be:
//Moves window to 0,0
gui_move(WIN_MAIN, 0, 0) //Win_main is the generated name in the header file

Although, since Halfix is a nanocore, everything is a plugin.
If the user runs without a GUI, they would load the normal CONSOLE plugin. If they want a GUI, they run a special version of the CONSOLE plugin which would redirect all drawings to the screen. This will all be done without the app noticing.
ineo

Re:Your GUI design?

Post by ineo »

Hi !

There seems to be a lot of people interested in gui design out there. I don't know if I am the only one who thinks it may be the wrong place to ask.
Maybe we should have a dedicated "graphics, gui design" section.

Just a suggestion, not flaming...

INeo
Post Reply