World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Brock 26-Feb-2006 [3019] | selecting a few with Ctrl-click, then selecting all, then Ctrl-clicking on one to remove it from the selection then shows all but the un-selected item... Seems Ctrl-click should be showing all months. |
Ashley 27-Feb-2006 [3020] | tour.r uses the text-list as follows: ex-text-list: text-list (tab-size - 70x25) #HW data (system/locale/months) [ show-text ex-text-list-text face/selected ] so the action (showing currently selected months) is only fired on a left-mouse click (single or double). The interesting design question here is whether CTRL-A *should also* fire the widget's action? I'm open to suggestions on this one. ;) |
Anton 27-Feb-2006 [3021] | I think so. It's a "selection action" rather than a "click action". The click is a way to achieve a selection, and so is the ctrl-A. |
Graham 27-Feb-2006 [3022x2] | but if the event depends on what is selected ? |
ie. what is appropriate for one select may not be for multiple selects. | |
Anton 27-Feb-2006 [3024x2] | The action code can merely examine the current selection. |
oh no! the user has to write more code to handle that! In multi mode, the user code can't avoid having to check face/selected to see what is in it. | |
Ashley 27-Feb-2006 [3026] | Fixed in one line: if find face/options 'multi [ clear face/picked repeat i face/rows [insert tail face/picked i] face/action face ; added ] works well, with the face being the row last clicked on. %tour.r works without modification. |
Graham 27-Feb-2006 [3027x2] | So far, 0.40 is working well with my EMR. |
I would like to see keycode support if possible. | |
DideC 27-Feb-2006 [3029] | Asley: having done some personnal work on area with scroller, 8 hours is not so much to have it working the right way. |
Robert 27-Feb-2006 [3030] | Yes, keycode is an important thing to support. I never like apps, especially the one I use a lot, that can't be controled by short-cuts. The most important one is, how to jump in/out of group-boxes, to be able to fill in input-forms. |
Ashley 27-Feb-2006 [3031] | Keycodes are already supported; try: display "Test" [ button #"a" [print "A"] button #"b" [print "B"] ] Full keyboard navigation (e.g. tabing into out of group-box, tab-panel, etc) is another issue. |
Pekr 27-Feb-2006 [3032] | well, even model of View is not still OK .... I think the pop-face is not ok. Try list-down style and try to press mouse outside its boundaries, it should close, but it does not. It at least reacts to ESC, but that is hardly sufficient ... |
Graham 27-Feb-2006 [3033] | that was quick Ashley! |
Izkata 27-Feb-2006 [3034] | keycodes were a part of VID, which the source of 'display seems to use.... |
Ashley 27-Feb-2006 [3035] | I added them back in 0.3.2. Note that case does not matter: #"a" will match both "a" and "A". keycodes were a part of VID, which the source of 'display seems to use ... correct on the first count, but keycodes in VID are implemented via the global events system which is not used in RebGUI (for those who are interested and have the SDK sources; have a look at %view-vid.r - Carl's comments make interesting reading). RebGUI uses a much simpler (and dare I say more efficient) approach whereby the layout function (%rebgui-layout.r) collects keycode / face pairs and places them in a keycodes block at the window level (%rebgui-display.r). These keycodes are used by the 'process-keystroke function in %rebgui-edit.r. All this is very different from the way in which VID does this. |
Gregg 28-Feb-2006 [3036] | That sounds like a good approach Ashley, kind of like Windows accelerator tables. |
Ashley 28-Feb-2006 [3037x3] | Doing it at the window level has a lot of advantages; namely: 1) automatically supports / handles duplicate keycodes across multiple windows 2) scales well (a window without keycodes doesn't carry the same overhead as one with lots) 3) can have multiple keycodes referring to the same face (for efficiency, RebGUI's layout function only uses the last one specified) 4) can have a keycode that refers to multiple faces (for sanity's sake, RebGUI only acts upon the first face referred to) |
Robert: "... a way to specify a starting size of the window that's not maximized. I want my app started with a size of 1024x768" Is that inclusive or exclusive of: 1) OS Window title bar and borders (which varies not only between OS, but also OS version and what DPI settings are in force) 2) Taskbar size and position (Windows) or Dock size and position (Mac) or ... (Linux) Also, what happens if: 1) My display is 800x600, or the more common 1280x1024 2) I use a TabletPC or have an LCD in 768x1024 portrait mode? 3) Someone wants to use my app on a small PDA (300x200) These are hard issues for a GUI designer to address in a generic manner. RebGUI provides some generalized approaches: 1) margin, gap, slider width, cell and font sizes - so you can choose sizes appropriates for the target display device 2) colors - so you can cater for 256-color (or lower) devices 3) Auto-resize directives (#HWXY) combined with /maximize - so your displays can use all available space without having to know the resolution in advance 4) /position refinements that are generic (top, bottom, first, second) - so you can design layouts in terms of, "I want this display on the left and this one on the right" So the long answer to this question is, wanting to set an explicit display size is the wrong approach unless you are targeting a specific resolution device - and in that case just design your displays to use /maximise and be done with it. ;) | |
Robert: "Is there a way to re-use widgets like done with 'style in VID? For example: I have a drop-list specification, I need at several places but I don't want to copy the code." Short answer, no. If you have a "style" that is sufficiently different from the base widget (that is used often) then consider: 1) modify the widget's defaults in %rebgui-widgets.r, or 2) modify them inline, as in: ctx-rebgui/widgets/<widget>/<facet>: <value> 3) derive a new widget that works exactly the way you want. | |
Gabriele 28-Feb-2006 [3040] | Ashley: there is a reason, though, why VID was done that way. What happens if you add a face to a window's pane? VID allows that without any special processing. In your case you need to update the keycode table for the window. |
Ashley 28-Feb-2006 [3041] | And more. In VID you can quite easily add a face to another face's pane, whereas in RebGUI you sometimes want to add (or replace) a particular widget in a display with another (there is little need in RebGUI to add faces to a pane as these low-level details are taken care of by the widgets themselves). |
Graham 2-Mar-2006 [3042x3] | I'm finding that some of my windows won't respond to using keycodes. |
display "Keycode" [ text "test" return button "Close" #"^[" [halt] ] do-events | |
doesn't respond to esc key | |
Ashley 2-Mar-2006 [3045] | Added to issues. I think it is being [erronously] trapped by the area / field undo functionality. |
Graham 2-Mar-2006 [3046] | that's going to be tricky to solve then. |
Ashley 2-Mar-2006 [3047] | Not really. RebGUI can work out what widget currently has focus (if any) AND if it's a widget that has undo support enabled. |
Graham 2-Mar-2006 [3048] | got a quick fix then ? :) |
Ashley 2-Mar-2006 [3049] | When I get some time to look at it. ;) |
Graham 2-Mar-2006 [3050x2] | can you have more than one keycode for a field? |
eg. I want to use space and ^M for "OK" | |
Ashley 2-Mar-2006 [3052] | ESC can be fixed by changing the last few lines of 'process-keystroke (in %rebgui-edit.r) to read as follows: ; #"^[" [ ; ; ESC ; hide-popup ; ] ][ either all [ event/key = #"^[" find view*/pop-list view*/pop-face ][ hide-popup ][ ; if key is assigned to an action do it if any [ not view*/focal-face find [button] view*/focal-face/type ][ if f: select face/keycodes event/key [f/action f exit] ] ] ] Only the last of multiple keystrokes provided is used; but note that SPC is already mapped to button (so specifying #"^M" would give it two mappings ... a keystroke mapping and it's base "SPC activated on focus" default). |
Graham 2-Mar-2006 [3053] | in an alert, does the "OK" button automatically have focus? |
Ashley 2-Mar-2006 [3054] | No, but it should. |
Robert 3-Mar-2006 [3055x2] | startup-size: I know about all the problems. But I just want to be able to specify it. Because my app will work this way. It's not intended for 800x600 in the first version. At the moment I have to click on the window and move it, to get the min-size size. |
style: Hmm... ok. I'll have a look how to get it done. | |
Ashley 3-Mar-2006 [3057] | So the question remains; do you want to specify "size" inclusive or exclusive of OS title-bar and window border(s)? If min-size was enforced on opening the window (if that's even possible) would that suffice? |
Robert 4-Mar-2006 [3058] | Yes, because I than I just would use 1000x750 and that's great. |
Robert 7-Mar-2006 [3059] | Skinning: Is it possible ot skin RebGUI in a way that things like tabs look Mac like, or that I can add some eye-candy? |
Pekr 7-Mar-2006 [3060x3] | yes, Rebgui looks very vague :-) |
you can now at least change colors, I like more blue/grey combination with gradient ..... | |
but the answer in the past was that RebGUI was not meant to be that flexible .... so the chances of skinning system are imo limited ... but you can always go to 'tab style and change it yourself? | |
Robert 7-Mar-2006 [3063x2] | Yes, I know. IMO it makes sense to add a skinnig feature but a lightweight one. RebGUI is pure and minimalistic (which it isn't anyway) and in this sense should it be possible to add eye-candy stuff. |
How to set the focus to specific field? | |
Graham 7-Mar-2006 [3065] | show-focus ? |
Robert 7-Mar-2006 [3066x2] | Sounds good :-) |
What's the best way to create a number-only-input field? At the moment I just use field, where the user can input text and I first have to convert the input to-decimal to get back a number. Is there a way to just get back the number? | |
Graham 7-Mar-2006 [3068] | not yet. |
older newer | first last |