r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebGUI] A lightweight alternative to VID

Ashley
16-Mar-2008
[7484]
Certainly possible (creating an image of a display is trivial), but 
how would it be used / specified in practice, and what would we call 
this new widget? Perhaps a grouping widget?

	fan data [
		display "A" [...]
		display "B" [...]
		display "C" [...]
		...
	]


which would create a series of clickable display icons ... click 
the icon and that display comes to the foreground. Is that sort of 
what we are talking about?
RobertS
16-Mar-2008
[7485x3]
There seems to be a problem in 2.7.6 on WIn XP
start  rebvire them go to console
do %rebui.r
editor %some_file_not_yet_existing.r

; now hit Save as : concole returns and both console and editor are 
locked up
; TEST

; REpeat without load of rebgui.r ; warning so such file and then 
Save As will save as that file no problem
start rebview ; take typing lessuns furst  if nead bea  or vist www.wordie.org 
more often ...  varve,or silt laminae in lake beds varying with ...
start rebview and goto console
do %rebgui.r
Graham
16-Mar-2008
[7488x2]
You can't use VID and Regbui easily together like that
editor is VID.
Robert
17-Mar-2008
[7490]
Ashley, yes exactly. I think users will be much better in remember 
a screen layout instead of where in a menu hierarchy you find an 
entry.
Graham
17-Mar-2008
[7491x2]
Ashley, what do you feel about adding a default windowless menu for 
on-alt-click for fields for copy/paste ?
something like 

    display "Edit Field" [
        margin 0x0

        at 0x0 button "Copy text" 20x6 green [unview/only face/parent-face 
        write clipboard:// f/text ]  

        at 0x6 button "Paste text" 20x6 green [unview/only face/parent-face 
        set-text f read clipboard:// f/text ] 

        at 0x12 button "Close" 20x5 gold [unview/only face/parent-face ] 
        do [face/options: [no-title no-border]]
    ]

but opening the window near where the mouse click occurs
RobertS
17-Mar-2008
[7493]
is there an option to set editor to a func which is rebgui compatible? 
 i.e. a rebgui text editor ?
btiffin
17-Mar-2008
[7494]
I tried once.  But it was more an exercise in linking RebGUI menu 
Find/Replace to area ... too many hacks to keep caret in synch, so 
instead of tarnish Dobeash with my lousy code ... I just didn't. 
  But a quick RebGUI display of an area isn't too hard to pull off, 
but you need to rely on the built in key handlers.  Sadly Find/Replace 
is not in the list, but you do get a spell checker 'for free'.  ;) 
  In Ashley's defence, it is not the design intent of RebGUI to be 
an editor.


I've not tried, but Anton has been pumping out a new editor ... may 
conflict less than  editor  dunno, but I kinda doubt it will work 
without the same types of problems.

Alternative is to use CALL and launch an external editor.
Graham
17-Mar-2008
[7495]
I think you might be able to use the editor within rebgui .. just 
not at the console like you did.
Ashley
18-Mar-2008
[7496]
re: on-alt-click ... good idea, added to next build (using the choose 
function so the code is tight).
Graham
18-Mar-2008
[7497x3]
Ashley I can get the menu to popup by setting the action/on-alt-action 
in the field widget definition but how would one know where to pop 
the menu up?
on-alt-click
Hmm.  Did something wrong .. my menu also appears on buttons with 
a RMB click.   So, I can change the text on buttons on the fly!  
Useful I guess
JohanAR
18-Mar-2008
[7500]
I started writing a simple file browser widget today. It's almost 
usable, but maybe someone else has already made such thing so I'm 
wasting my time?
Pekr
18-Mar-2008
[7501]
there is a grid widget, where you can put any style inside. It was 
not updated to latest RebGUI API though ...
JohanAR
18-Mar-2008
[7502]
I'm using a table which seems to be working quite good. Just thought 
that someone might have done a better one :)
Ashley
18-Mar-2008
[7503]
Graham, FYI the init patch to field for the on-alt-click functionality 
is:

	init:	make function! [] [
		either find options 'info [
			feel: none
			all [color = colors/page color: colors/outline-light]
		][
			unless get in action 'on-alt-click [
				action/on-alt-click: make function! [face] [

     switch choose face sizes/line * 4 face/offset ["Copy text" "Paste 
     text" "Close"] [
						"Copy text"		[write clipboard:// face/text]
						"Paste text"	[set-text face read clipboard://]
					]
				]
			]
		]

  para: make para [] ; avoid shared para object for scrollable input 
  widget

  all [negative? size/x size/x: 10000 size/x: 4 + first size-text self]
	]
Graham
18-Mar-2008
[7504x3]
thanks.
Not sure if 'choose works well with Rebgui.  What I am seeing is 
that if I release the RMB, the menu disappears, and if the field 
is close to the bottom of the container eg. group-box, then the menu 
appears inside the field.
with scroll bar and arrows.
Graham
19-Mar-2008
[7507x3]
Ashley, can we have a method that sets the slider and contents back 
to 0 for area and table ?
the problem is that if the slider is set to the bottom, and you refresh 
the text in an area widget, you won't necessarily see it until you 
drag the slider back to the top.  Same applies for table.
OTOH, it's often useful to redraw a table and keep the slider at 
the current position.
Graham
20-Mar-2008
[7510]
Currently the function key handler has to decide whether the shift/control 
keys are pressed and does appropriate actions.

How about instead make it a block, and the handler picks the first 
function if there are no other keys pressed, the second for shift, 
and the third for control, and the fourth for whatever?
JohanAR
21-Mar-2008
[7511]
I'm not 100% sure what Graham requests about the sliders, but it 
might be the same as a feature I wanted. I wrote alot of text to 
an area with a scroller, and I want to be able to remove text at 
the top and insert at the bottom - while keeping the horizontal scroller 
at the bottom (unless the user wants to scroll up ofcourse, in case 
the scroller should stay exactly where it is). In other words similar 
to a DOS prompt with some scrollback buffer.


Can't remeber exactly what problems I had with it, but it didn't 
work as intended :) Now I'm using a chat widget instead and it works 
pretty good. Not a bad feature to have though.
Graham
21-Mar-2008
[7512]
Johan, if you have a large amount of text, and the slider is set 
to the bottom, and then you set-text with a small amount of text, 
it doesn't show up until you physically scroll the slider up to the 
top.
Graham
22-Mar-2008
[7513]
Any suggestions on how to "lock" an application while it is running? 
 Unview all the windows and bring up a requester?  Then restore all 
the active windows?
Ashley
23-Mar-2008
[7514]
You need a requestor with the no-title option so they can't OS close 
the dialog .... that or a /close refinement to trap and ignore it. 
Have a look at the source for both request-progress and request-password.
JohanAR
23-Mar-2008
[7515]
Is it possible to display a modal window, without using dialog? My 
program gets screwed up if display calls do-events and disables tooltips, 
but I don't want users mucking about with the main window while another 
window is open.


And speaking of which.. Is disabled tooltips in dialogs a new feature? 
I suspect it's the reason my tooltips stopped working a while ago 
:\
Graham
23-Mar-2008
[7516x2]
A modal window might interfere with the async events happening in 
the background.
Yes, a modal requestor halts all timer events that are occuring.
JohanAR
23-Mar-2008
[7518x3]
Hmm, but is there an easy way to disable/enable all interactive widgets 
in a particular window?
I'm also trying to find a way to hide/show a single window. Would 
work in my app too, but I haven't found out how yet though :)
More specifically it's the main window I'm trying to hide...
Graham
23-Mar-2008
[7521x2]
what I am doing is to unview the main window, and then when the user 
enters the correct password, just view/new main-window
Maybe what i need to do is keep a record of all the active windows, 
unview/all and later on view them all again.
So, need a view/all windows [block!]
JohanAR
23-Mar-2008
[7523x2]
Where is the initial position calculated for a widget with #XY span 
set?
I'm changing the pane of a window by calling layout manually, but 
all widgets with span seem to be placed regarding to the old layout's 
size :(
Ashley
23-Mar-2008
[7525]
Note that layout and ctx-rebgui/layout are different funcs ;)
JohanAR
23-Mar-2008
[7526]
indeed :) It's the latter I'm calling, to get the neat rebgui look. 
just can't figure out the internal workings of #XY though
yeksoon
25-Mar-2008
[7527]
is there 'grid' support in RebGUI?

Could not find it in the docs. I may have miss it.
Pekr
25-Mar-2008
[7528]
there is a widget, which is quite cool by its functionality, but 
it was never adapted to one architecture change in RebGUI
Sunanda
25-Mar-2008
[7529]
Support request on Mailing List:

http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlRHXC
Graham
25-Mar-2008
[7530]
There is the spreadsheet thingy which is a grid.
yeksoon
25-Mar-2008
[7531]
thanks. will look into it.
JohanAR
5-Apr-2008
[7532x2]
Maybe it would be more consistant if rebgui loaded ui.dat and request-ui 
saved the file in the same dir? request-ui saves in current script 
dir, while the main script loads from it's own dir?
I also suggest "theme" is extended with one or two colors. For example 
to use on panels. It looks weird with buttons if I use either theme-light 
or theme-dark on a grouping panel, and I don't want to use custom 
colors that won't appear in request-ui