From c5bc2b25f42d8231e7e072b0c8b73a472c21b09c Mon Sep 17 00:00:00 2001 From: Jim Date: Wed, 17 Jun 2015 21:11:38 -0700 Subject: [PATCH] update help treebox data --- Documentation/yab-Commands | 2 +- yab-IDE/Programs/Examples/SliderWorld.yab | 12 +- yab-IDE/Programs/Examples/Tedit.yab | 174 +++++ yab-IDE/data/Help_En.dat | 863 +++++++++++++++++++++- yab-IDE/data/Help_En_Index.dat | 792 +++++++++++--------- 5 files changed, 1465 insertions(+), 378 deletions(-) create mode 100755 yab-IDE/Programs/Examples/Tedit.yab diff --git a/Documentation/yab-Commands b/Documentation/yab-Commands index 4b12408..cc894e4 100644 --- a/Documentation/yab-Commands +++ b/Documentation/yab-Commands @@ -757,7 +757,7 @@ TREEBOX REMOVE TreeBox$, ListItem$ Removes the first list item ListItem$ from the tree. Note: this also removes all subitems! n = TREEBOX COUNT TreeBox$ Returns the number of entries in TreeBox$ -Item$ = TREEBOX GET TreeBox$, Position +Item$ = TREEBOX GET$ TreeBox$, Position Returns the Item$ at position Position in TreeBox$. TREEBOX EXPAND TreeBox$, Head$ Expands Head$ in TreeBox$. diff --git a/yab-IDE/Programs/Examples/SliderWorld.yab b/yab-IDE/Programs/Examples/SliderWorld.yab index c1330d3..e1e5a4c 100755 --- a/yab-IDE/Programs/Examples/SliderWorld.yab +++ b/yab-IDE/Programs/Examples/SliderWorld.yab @@ -2,16 +2,18 @@ window open 100,100 to 560,320, "WView", "SliderWorld" -slider 20,20 to 350,50, "Slider1", "1. Slider with block thumb from 0.1 to 1", 1, 10, "WView" +layout "left,top","WView" -slider 20,70 to 350,100, "Slider2", "2. Slider with triangle thumb from 1 to 100 and limit labels; set to 20", 1, 100, "triangle", "WView" +slider 20,10 to 350,40, "Slider1", "1. Slider with block thumb from 0.1 to 1", 1, 10, "WView" + +slider 20,50 to 350,80, "Slider2", "2. Slider with triangle thumb from 1 to 100 ", 1.5, 100, "triangle", "WView" slider label "Slider2", "Foo", "Bar" slider set "Slider2", 20 -slider 20,120 to 350,150, "Slider3", "3. Slider from 50 to 75, with 5 bottom hash markings, disabled", 50, 75, "WView" +slider 20,110 to 350,140, "Slider3", "3. Slider from 50 to 75,", 50, 75, "WView" slider label "Slider3", "Foo", "Bar" -slider set "Slider3", "bottom", 5 -option set "Slider3", "enabled", false +slider set "Slider3", "bottom", 25 +//option set "Slider3", "enabled", false slider 20,170 to 350,200, "Slider4", "4. Slider from -20 to 20, with colors", -20, 20, "WView" slider color "Slider4", "barcolor", 240,140,140 diff --git a/yab-IDE/Programs/Examples/Tedit.yab b/yab-IDE/Programs/Examples/Tedit.yab new file mode 100755 index 0000000..31bd97b --- /dev/null +++ b/yab-IDE/Programs/Examples/Tedit.yab @@ -0,0 +1,174 @@ +#!yab + +############# Prologue ############# + +ProgramName$ = "Teditor" + +AuthorName$ = "Joe Bloggs" + +ProgramVersion$ = "V0.1" + +ProgramBriefDescription$ = "My unbelievable first yab program." + +ProgramLicense$ = "Public Domain" + +ProgramAcknowledgements$ ="With thanks to Michel Clasquin-Johnson for writing Teditor and to  Marc-Oliver Ihm, Jan Bungeroth and Jim Saxton for creating yab!" + + + +//*****Global Variables**** + +## Technically, yab does not require you to declare global variables, it just is a really, really good idea to do it anyway. + +// set DEBUG = 1 to print out all messages on the console + +DEBUG = 1 + +//change this to DEBUG = 0 when you are ready to bind the program for distribution + + + +OpenWindow() + +#######End of Prologue####### + + + +############# Main Message Loop ############# + +dim msg$(1) + +while(not leavingLoop) + nCommands = token(message$, msg$(),"|") + for everyCommand = 1 to nCommands + if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand) + switch(msg$(everyCommand)) + case "_QuitRequested": + case "MainWindow:_QuitRequested": + case "MainWindow:File:Quit": + leavingLoop = true + break + case "MainWindow:File:Save": + SaveFile() + break + case "MainWindow:File:New": + NewFile() + break + case "MainWindow:File:Open": + OpenFile() + break + case "MainWindow:Edit:Undo/Redo": + textedit set "EditSpace", "undo" + break + case "MainWindow:Edit:Cut": + textedit set "EditSpace", "cut" + break + case "MainWindow:Edit:Copy": + textedit set "EditSpace", "copy" + break + case "MainWindow:Edit:Paste": + textedit set "EditSpace", "paste" + break + case "MainWindow:Edit:Select All": + textedit set "EditSpace", "select-all" + break + case "MainWindow:Help:About": + Alert ProgramName$ + " " + ProgramVersion$ + "\n" + "by " + AuthorName$ +"\n\n" + ProgramBriefDescription$ + "\n" + ProgramLicense$ + "\n" + ProgramAcknowledgements$, "OK", "none" + default: + break + end switch + next everyCommand +wend + +CloseWindow() +end +#######End of Main Loop####### + +sub CloseWindow() + +//Close down the main window + +NewFile() +window close "MainWindow" +end sub + + +sub MakeMenu() + +//Create menu in MainWindow + +menu "File", "New", "N", "MainWindow" +menu "File", "Open", "O", "MainWindow" +menu "File", "Save", "S", "MainWindow" +menu "File", "Quit", "Q", "MainWindow" +menu "Edit", "Undo/Redo", "Z", "MainWindow" +menu "Edit", "Cut", "X", "MainWindow" +menu "Edit", "Copy", "Z", "MainWindow" +menu "Edit", "Paste", "Z", "MainWindow" +menu "Edit", "Select All", "A", "MainWindow" +menu "Help", "About", "", "MainWindow" +end sub + + + +sub NewFile() + +local sos +if textedit get$ "EditSpace" <> "" then + sos = alert "Save Current Text First?", "Yes", "No", "", "none" + if sos = 1 SaveFile() + textedit clear "EditSpace" +endif + +end sub + + + +sub OpenFile() + +local file2open$, anewline$ + +NewFile() +file2open$ = filepanel "load-file", "Open Which File?", "/boot/home" +if file2open$ <> "" then + open file2open$ for reading as #1 + while(not(eof(1))) + line input #1 anewline$ + textedit add "EditSpace", anewline$ + "\n" + wend + close #1 + textedit set "EditSpace", "gotoline", 1 +endif + +end sub + + + +sub OpenWindow() + +//Setup the main window here + +Window open 100,100 to 600,500, "MainWindow", "Teditor" +textedit 0,20 to 499, 399, "EditSpace", 3, "MainWindow" +textedit set "EditSpace", "wordwrap", 0 +MakeMenu() + +end sub + + + +sub SaveFile() + +local file2save$,filename$ + +file2save$ = textedit get$ "EditSpace" +if file2save$ <> "" then + filename$ = filepanel "save-file", "Save File As ...", "/boot/home" + if filename$= "" return + open filename$ for writing as #1 + print #1 file2save$ + close #1 +endif + +end sub + diff --git a/yab-IDE/data/Help_En.dat b/yab-IDE/data/Help_En.dat index 667805a..5b44ecc 100644 --- a/yab-IDE/data/Help_En.dat +++ b/yab-IDE/data/Help_En.dat @@ -156,7 +156,6 @@ Widgets:Slider Slider:slider set Slider:slider label Slider:slider get -Slider:slider hashmarks Slider:slider color Slider:slider Widgets:Radiobutton @@ -234,7 +233,9 @@ Scrollbar:scrollbar get Scrollbar:scrollbar Views:layout Views:canvas -Views:boxview +Views:Boxview +Boxview:boxview set +Boxview:boxview Graphical User Interface:Printing Printing:printer setup Printing:printer @@ -5263,6 +5264,7 @@ This program uses all forms of bitmap get and displays the output in a Window. Related: bitmap, bitmap color, bitmap image, bitmap remove, bitmap save, draw bitmap & bitmap image + Name: bitmap image -- copies an image file to a bitmap. @@ -5277,6 +5279,7 @@ Related: bitmap, bitmap color, bitmap get, bitmap remove, bitmap save, draw bitm & bitmap remove + Name: bitmap remove -- removes a bitmap from memory @@ -5307,6 +5310,7 @@ Related: bitmap, bitmap color, bitmap get, bitmap image, bitmap remove, draw bit & screenshot + Name: screenshot -- copies the specified region of the desktop onto a bitmap @@ -5332,19 +5336,23 @@ DRAW BITMAP x1,y1 TO x2,y2, Bitmap$, Mode$, View$ Description: DRAW BITMAP x,y, Bitmap$, Mode$, View$ - Draw a bitmap on a view, another bitmap or a canvas. - Possible Mode$: - "Copy" -- copy the bitmap to the target ignoring transparency - "Alpha" -- copy the bitmap to the target supporting transparency +Draw a bitmap on a view, another bitmap or a canvas. + +Possible Mode$: + +"Copy" -- copy the bitmap to the target ignoring transparency +"Alpha" -- copy the bitmap to the target supporting transparency DRAW BITMAP x1,y1 TO x2,y2, Bitmap$, Mode$, View$ - Draws and scales the bitmap Bitmap$. - If x2 is set to -1, the width is scaled according to the height; - if y2 is set to -1, the height is scaled according to the width; - if x2 and y2 are set to -1, the image is not scaled at all (this is like DRAW BITMAP x,y, Bitmap$, Mode$, View$). - Possible Mode$: - "Copy" -- copy the bitmap to the target ignoring transparency - "Alpha" -- copy the bitmap to the target supporting transparency +Draws and scales the bitmap Bitmap$. +If x2 is set to -1, the width is scaled according to the height; +if y2 is set to -1, the height is scaled according to the width; +if x2 and y2 are set to -1, the image is not scaled at all. + +Possible Mode$: + +"Copy" -- copy the bitmap to the target ignoring transparency +"Alpha" -- copy the bitmap to the target supporting transparency & draw circle @@ -5867,9 +5875,9 @@ The command returns one of the following error codes: Message: The destination yab application will produce a message$ stating: -&exverbatim + _Scripting:...| -&exverbatim + (The ... is the Message$.) @@ -6465,6 +6473,7 @@ The submenu is in radio mode, so only one item can be selected. The user will do Related: menu, menu set, submenu &Views +&Boxview & boxview @@ -6503,6 +6512,18 @@ The example opens a window and sets up a boxview with the label "Hello Box" and Related: view, view remove & +boxview set + +Name: +boxview set -- set the label and boarder for a boxview + +Synopsis: +BOXVIEW SET ID$, Option$, Value$ + +Description: +Option$ = "Label", Value$ = new label +Option$ = "Line", Value$ = "0|1|2" no |simple | fancy border +& canvas Name: @@ -6524,7 +6545,7 @@ related: draw bitmap, bitmap get layout Name: -latout -- Set the layout for all views on a window. +layout -- Set the layout for all views on a window. Synopsis: LAYOUT Layout$, WindowOfView$ @@ -6537,8 +6558,14 @@ Layout$ (not case sensitive): except for listboxes and textedit which follow all sides. "All" = follow all sides (widgets resize) "None" = follow the top and the left side (equals "top, left") - -OR- Layout$ is a combination of a horizontal and a vertical command (e.g. "Right, Top" etc.). - Horizontal: + + -OR- Layout$ is a combination of horizontal , vertical (e.g. "Right, Top" etc.). + +NOTE: + +In combination, horizontal is first and virtical is second. "Right,Top" is ok, "Top, Right" is not. + +Horizontal: "Left" = follow left side (default, when no other horizontal layout is given) "Right" = follow the right side "Left, Right" = follow the left and the right side (resize) @@ -6593,23 +6620,92 @@ SCROLLBAR SET Scrollbar$, "Horizontal Steps", SmallSteps, BigSteps Description: SCROLLBAR SET Scrollbar$, Borderoption$ - Borderoption$ = "no-border" or "plain-border" or "fancy-border" (default) +Borderoption$ = "no-border" or "plain-border" or "fancy-border" (default) + SCROLLBAR SET Scrollbar$, "Vertical Position", Position + SCROLLBAR SET Scrollbar$, "Horizontal Position", Position - Set the scrollbar to the position Position. Default is (0,0). +Set the scrollbar to the position Position. Default is (0,0). + SCROLLBAR SET Scrollbar$, "Vertical Range", Min, Max + SCROLLBAR SET Scrollbar$, "Horizontal Range", Min, Max - Set the scrollbars to a maximum range, default is (1000,1000). - Note: the Max value will be added to the view's actual width/height. +Set the scrollbars to a maximum range, default is (1000,1000). +Note: the Max value will be added to the view's actual width/height. + SCROLLBAR SET Scrollbar$, "Vertical Steps", SmallSteps, BigSteps + SCROLLBAR SET Scrollbar$, "Horizontal Steps", SmallSteps, BigSteps - Set the scrollbar steps. - SmallSteps are the scrolling steps when the user clicks on the arrow buttons (default is 1.0). - BigSteps are the scrolling steps when the user clicks on the empty part of the scrollbar (default is 10.0). +Set the scrollbar steps. +SmallSteps are the scrolling steps when the user clicks on the arrow buttons (default is 1.0). +BigSteps are the scrolling steps when the user clicks on the empty part of the scrollbar (default is 10.0). Related: scrollbar, scrollbar get +&Splitview +& +splitview + +Name: +splitview -- Set up the new view and split it into two new views. + +Synopsis: +SPLITVIEW x1,y1 TO x2,y2, ID$, IsVerticalSplit, NormalStyle, View$ + +Description: +Set up the new view ID$ and split it into two new views ID$+"1" and ID$+"2". +If IsVerticalSplit = true, a vertical splitter is set +if IsVerticalSplit = false, a horizontal splitter is set +If NormalStyle = true, the splitter is 10 pixels thick +If NormalStyle = false, the splitter is 4 pixels thick + +Example: + +splitview 120,110 to 260,195, "Split", true, false, "Box2" +draw set "bgcolor", "Panel-Background-Color, Darken-1-Tint", "Split1" +draw set "bgcolor", "Panel-Background-Color, Lighten-1-Tint", "Split2" +tooltip "Split", "SPLITVIEW" + +Explanation: + +This snippet from then AllInOne.yab example program opens a splitview and changes the background colors of each pannel so it is easy to see the two suib-views. + +related: splitview set, stackview, tabview +& +splitview get + +Name: splitview get -- Get the current position of the divider + +Synopsis: +Position = SPLITVIEW GET SplitView$, "Divider" + +Description: +Get the current position of the divider. + +Related: splitview, splitview set + +& +splitview set + +Name: +splitview set -- Set the position of the divider, or the minimum sizes of the view + +Synopsis: +SPLITVIEW SET SplitView$ "Divider", Position +SPLITVIEW SET SplitView$ "MinimumSizes", LeftOrTop, RightOrBottom + +Description: + +SPLITVIEW SET SplitView$ "Divider", Position +Set the position of the divider, default is the half of the total split view. + +SPLITVIEW SET SplitView$ "MinimumSizes", LeftOrTop, RightOrBottom +Set the minimum sizes of the left (or top) view and the right (or bottom) view. + +Related: slpitview + +&Stackview & stackview @@ -6690,6 +6786,136 @@ Description: To switch the views of a stackview, yoy have to use this command. Simply provide it with the ID of the stackview (here: StackView$) and the number of the view you want it to show. Remember: The first view on the stack has the number 1. If you provide an invalid number, nothing will happen. Related: stackview, stackview get +&Tabview +& +tabview + +Name: +tabview -- Open a tabview and chose top/bottom for the tabs + +Synopsys: +TABVIEW x1,y1 TO x2,y2, ID$, Option$, View$ + +Description: +Open a tabview and chose top/bottom for the tabs: +Option$ = "top, bottom" where to place the tabs. + +Related: splitview, stackview +& +tabview add + +Name: +tabview add -- Adds a new view and new tab to a tabview. + +Synopsys: +TABVIEW ADD TabView$, TabName$ + +Description: +For each tab, a new view is created; you can add widgets or draw on these views as ususal. +The ids for the views ist TabView$+"1" for the first, TabView$+"2" for the second view, etc. + +example: + +// make the tabview +tabview 10,60 to 530,390, "Box", "top", "Win" +tabview add "Box", "Widgets" +tabview add "Box", "Views and More" + +// button +button 10,10 to 100,30, "Button", "Button", "Box1" +tooltip "Button", "BUTTON" + +Explanation: + +This snippet from the AllInOne.yab example program sets up a tabview called Box on the main Window view "Win" with the tabs at the top, then adds two tabs. "Widgets" is the first tab, "Box1", and "Views and More" is the second tab, "Box2". the button is added to the tab labeled "Widgets." + +Related: tabview tabview get, tabview set +& +tabview get + +Name: +tabview get -- get the curent open tab number + +Synopsis: +TabNumber = TABVIEW GET TABVIEW$ + +Description: +Get the current opened tab. + +Related: tabview, tabview sdd tasbview set + +& +tabview set + +Name: +tabview set -- Chose the current tab + +Synopsys: +TABVIEW SET TabView$, TabNumber + +Description: +Open the tab number TabNumber. + +Related: tabview tabview add, tabview get + +&View +& +view + +Name: +view -- add a view + +Synopsis: +VIEW x1,y1 TO x2,y2, ID$, View$ + +Description: + Adds a view + +Related: view get, view remove +& +view dropzone + +Name: +view dropzone -- Definea view as a drop zone that accepts dropped files. + +synopsis: +VIEW DROPZONE View$ + +Description: +Define View$ as a drop zone that accepts dropped files. +DROPZONE accepts multiple files (and sends them in inversed order as message) +Related: view +& +view get + +Name: +view get -- gets information about a view + +Synopsis: +Result = VIEW GET View$, Option$ + +Description: +Option$ = "Position-X/Position-Y/Width/Height/Exists/Focused" +Returns the requested property or if used with Exists/Focused returns 1 if so and 0 if not. +& +view remove + +Name: +view remove -- remove a view + +Synopsis: +VIEW REMOVE View$ + +Description: +Remove View$. The window view cannot be removed. Should be much more stable now. +Warning: Currently clears all internal information about menues and drop boxes. It is only safe to use it, when you don't have any menues or drop boxes on views that will not be removed. + +Warning: + +Never remove menus with shortcuts, otherwise yab will crash when the shortcut key is pressed! + +Related: view, view get + &Widgets & button @@ -7260,6 +7486,139 @@ In the given columnbox named ColumnBox$, the specified row is selected. If Row i Have a look at the columnbox command for an example. Related: columnbox, columnbox add, columnbox clear, columnbox color, columnbox column, columnbox count, columnbox get, columnbox get$, columnbox remove +&Dropbox +& +dropbox + +Name: +dropbox -- Adds an empty dropbox. + +Synopsis: +DROPBOX x1,y1 TO x2,y2, ID$, Label$, View$ + +Description: +Adds an empty dropbox (BMenuField) at (x1,y1) to (x2,y2) known as ID$ and with a label on View$. + +Example: + +snippet + +DROPBOX 290,60 TO 480,80, "category", "Category:", "Mainview1" + DROPBOX ADD "category", "Audio" + DROPBOX ADD "category", "Business" + DROPBOX ADD "category", "Development" + DROPBOX ADD "category", "Education" + DROPBOX ADD "category", "Games" + DROPBOX ADD "category", "Graphics" + DROPBOX ADD "category", "Internet and Network" + DROPBOX ADD "category", "Productivity" + DROPBOX ADD "category", "Science and Matyhematics" + DROPBOX ADD "category", "System and Utilities" + DROPBOX ADD "category", "Video" + DROPBOX SELECT "category", 8 + +end snippet + +Explanation: + +The dropbox "category" is created with a label of "Categorty" in "MainView1." Next the categories to select from are added, and "Productivity" is set as the default category. When a different category is selectedm the dropbox returns a message: + +category:Science and Matyhematics + +if selection 9 is made. + + +Related: dropbox add, dropbox clear, dropbox count, dropbox get$, dropbox remove, dropbox select +& +dropbox add + +Name: +dropbox add -- adds an item to a dropbox. + +Synopsis: +DROPBOX ADD DropBox$, Item$ + +Description: +Add Item$ to the dropbox. Use Item$ = "--" for a separator. + +Related: dropbox , dropbox clear, dropbox count, dropbox get$, dropbox remove, dropbox select +& +dropbox clear + +Name: +dropbox clear -- Clear all items from a dropbox. + +Synopsis: +DROPBOX CLEAR DropBox$ + +Description: +Clear dropbox DropBox$ of all items. + +Related: dropbox , dropbox add, dropbox count, dropbox get$, dropbox remove, dropbox select +& +dropbox count + +Name: +dropbox count -- count the number of items in a dropbox. + +Synopsis: +n = DROPBOX COUNT DropBox$ + +Description +Count the number of items. + +Related: dropbox , dropbox add, dropbox clear, dropbox get$, dropbox remove, dropbox select +& +dropbox get$ + +Name: +dropbox get$ -- Get the string of the item at a position. + +Synopsis: +Item$ = DROPBOX GET$ DropBox$, Position + +Description: +Get the item$ at Position fior the dropbox Dropbox$. + +Related: dropbox , dropbox add, dropbox clear, dropbox count, dropbox remove, dropbox select +& +dropbox remove + +Name: +dropbox remove -- removes an item from a dropbox. + +Synopsis: +DROPBOX REMOVE DropBox$, Position + +Description: +Removes item number Position. +Note: If the removed item was marked, the item before it will be marked instead. You will NOT get +a message that the marked item has changed. If the first item will be deleted, the next item in +the drop box will be marked. + +Note: + +Each time an item was removed, the drop box count will change as well! + +Related: dropbox , dropbox add, dropbox clear, dropbox count, dropbox get$, dropbox select +& +dropbox select + +Name: +dropbox select -- Select a dropbox item. + +Synopsis: +DROPBOX SELECT DropBox$, Position + +Description: +Select the item at position Position. + +Note: + +Counting starts at 0. + +Related: dropbox , dropbox add, dropbox clear, dropbox count, dropbox get$, dropbox remove + & listbox @@ -7443,6 +7802,51 @@ Note: After sorting, any former selection is removed. Have a look at the listbox command for an example. Related: listbox, listbox add, listbox clear, listbox count, listbox get, listbox get$, listbox remove, listbox select +&Options +& +option color + +Name: +option color -- Set the background color of a view. + +Synopsis: +OPTION COLOR View$, "BGColor", r,g,b + +Description: +Set the background color of any view (note: this is different to DRAW SET!) +& +option set + +Name: +option set -- set various options for views and controls. + +Synopsis: +OPTION SET View$, "Auto-Resize" +OPTION SET View$, "Focus", HasFocus +OPTION SET Control$, "Enabled", IsEnabled +OPTION SET Control$, "Label", NewLabel$ +OPTION SET Control$, "Visible", IsVisible + +Description: +OPTION SET View$, "Auto-Resize" +Automatically resize the view View$ to preferred (when this is supported by the view). + +OPTION SET View$, "Focus", HasFocus +Set/remove the focus of View$ (when this is supported by the view). + +OPTION SET Control$, "Enabled", IsEnabled +Enable/disable the control Control$. + +OPTION SET Control$, "Label", NewLabel$ +Give a Control a new label. + +OPTION SET Control$, "Visible", IsVisible +Set the control Control$ invisible or visible + +Note: + +The following widgets are controls: +CHECKBOX, RADIOBUTTON, SLIDER, TEXTCONTROL, BUTTON, COLORCONTROL, SPINCONTROL, CALENDAR & radiobutton @@ -7503,6 +7907,138 @@ Description: If IsActivated is set to true, the radiobutton named RadioButton$ will be selected. If IsActivated is set to false, the radiobutton will be deselected. Note: This allows you to activate more than one radiobutton in a group which is not recommended. Related: radiobutton +&Slider +& +slider + +Name: +slider -- Add a slider control + +Synopsis: +SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, View$ +SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, Option$, View$ + +Description: +SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, View$ +Add a slider with a minimum and and a maximum value (Min, Max). + +SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, Option$, View$ +Option$ = "block/triangle, horizontal/vertical" + + +Example: + +see SliderWorld.yab for example usage. + +NOTE: + +The label, Label$ must be shorter than the slider or yab will re-size the slider to fit the label. This can cause the slider to be wider than the view. it is best to use short labels. + +Related: slider color, slider get, slider label, slider set +& +slider color + +Name: +slider color -- set the colors for a slider + +Synopsis: +SLIDER COLOR Silder$, Part$, r,g,b + +Description: +Sets the rgb color for the Part$ of Slider$ +Part$ = "barcolor" -- The color to the left or bottom, representing the slider's value. +Part$ = "fillcolor" -- The color to the right or top, representing the remainder of the posible slider value. + +Related: slider, slider get, slider label, slider set +& +slider get + +Name: +slidet get -- get the curent value of a slider + +Synopsis: +Value = SLIDER GET Slider$ + +Description: +Get the currently selected value of the slider. + +Related: slider, slider color, slider label, slider set + +& +slider label + +Name: +slider label -- Set start and end limit labels + +Synopsis: +SLIDER LABEL Slider$, StartLabel$, EndLabel$ + +Description: +Sets the StartLabel$ and EndLabel$ for the slider Slider$ + +Related: slider, slider color, slider get, slider set +& +slider set + +Name: +slider set -- set the slider value or hashmarks location and numnber + +Synopsis: +SLIDER SET Silder$, Location$, Count +SLIDER SET Silder$, Value + +Description: +SLIDER SET Silder$, Location$, Count + +Set the hashmarks. +Location$ = "none/bottom/top/both" use these valuse for hashmarks for horizontal sliders +Location$ = "none/left/rigth/both" use these valuse for hashmarks for vertical sliders +Count = number of hashmarks + +SLIDER SET Silder$, Value + +Set the slider to Value. Moves the slider indicator block to this location. + +Related: slider, slider color, slider get, slider label +&Spincontrol +spincontrol + +Name: +spincontrol -- Add a spincontrol to a view. + +Synopsis: +SPINCONTROL x,y, ID$, Label$, Min, Max, Step, View$ + +Description: +Add a spin control at x,y, named ID$, labeled Label$ with the range (Min,Max), counting by Step on View$. + +Related: spincontrol get, spincontrol set +& +spincontrol get + +Name: +spincontrol get -- Get the value of a spincontrol. + +Synopsis: +Value = SPINCONTROL GET SpinControl$ + +Description: +Get the current spin control value for SpinControl$. + +Related: spincontrol, spincontrol set +& +spincontrol set + +Name: +spincontrol set -- set the spincontrol to a value + +Synopsis: +SPINCONTROL SET SpinControl$, Value + +Description: +Sets the spin control SpinControl$ to value Value. + +Related: spincontrol, spincontrol get & statusbar @@ -7636,6 +8172,88 @@ Explanation: This fun program changes the alignment of the text every half second. Related: text +&Textcontrol +& +textcontrol + +Name: +textcontrol -- Add a textcontrol to a view. + +Synopsis: +TEXTCONTROL x1,y1 TO x2,y2, ID$, Label$, Text$, View$ + +Description: +Opens a textcontrol from (x1,y1) to (x2,y2) with Label$ and preset it with Text$ on View$ + +The distance from x1 to x2 needs to be long enough for the label Label$ and the textcontrol view. + +Message: +The textcontrol will return a message on invocation, ( by pressing tsb or enter after entering text.) + +id$:text$ + +Related: textcontrol clear, textcontrol get$, textcontrol set +& +textcontrol clear + +Name: +textcontrol clear -- Clears the text data from a textcontrol. + +Synopsis: +TEXTCONTROL CLEAR TextControl$ + +Description: +Delete the text of the text control. + +Related: textcontrol, textcontrol get$, textcontrol set +& +textcontrol get$ + +Name: +textcontrol get$ -- get the text held by a textcontrol. + +Synopsis: +Text$ = TEXTCONTROL GET$ TextControl$ + + +Description: +Get the entry of the text control TextControl$. Even works, when Return was not pressed. + +Related: textcontrol, textcontrol clear, textcontrol set +& +textcontrol set + +Name: +textcontrol set -- Set various options for a textcontrol. + +Synopsis: +TEXTCONTROL SET TextControl$, IsPassword +TEXTCONTROL SET TextControl$, Text$ +TEXTCONTROL SET TextControl$, Option$, Value$ + +Description: + +TEXTCONTROL SET TextControl$, IsPassword +IsPassword = false Normal typing +IsPassword = true Hide typing with * + +TEXTCONTROL SET TextControl$, Text$ +Set the text control's text to Text$. + +TEXTCONTROL SET TextControl$, Option$, Value$ +Option$="align" Value$= "left" / "right" / "center" +*** note *** Haiku has issues align right. There are open tickets. +Option$="exclude", Value$=characters to disallow. +Option$="include", Value$=characters to allow. +Option$="length", Value$=str$(number) of characters allowed. +Sets the font used to the system fixed font. +Option$="type" +Value$="number" Only allow to characters 0-9 and ".", full stop. +Value$=""alphanumeric" allow all characters. +Option$="focus" Value$ = "true" / "false" Set the focus of TextControl$. +Option$="Curser", Value$=str$(number) positions the curser, sets the focus to true. + +Related: textcontrol, textcontrol clear, textcontrol get$ & textedit @@ -7646,13 +8264,17 @@ Synopsis: TEXTEDIT x1,y1 TO x2,y2, ID$, ScrollbarType, View$ Description: +Opens an editor at (x1,y1) to (x2,y2) with ID$ (not displayed) on View$. -Layout: +ScrollbarType = 0 -- no scrollbar +ScrollbarType = 1 -- the textedit has a vertical scrollbar +ScrollbarType = 2 -- the textedit has a horizontal scrollbar +ScrollbarType = 3 -- the textedit has a vertical and a horizontal scrollbar -Design: +TEXTEDIT follows all sides in standard layout. -Example: -Explanation: +Example: +See Tedit.yab or AllInOne.yab example programs. Related: textcontrol, textedit add, textedit clear, textedit color, textedit get, textedit get$, textedit set & @@ -7764,8 +8386,45 @@ Option$ = "textwidth" -- set the maximum width of the text in pixel Given three parameters, the following options are valid for the textedit named TextEdit$ when the third parameter Value$ is a string: Option$ = "font" -- set the font to Value$ (see draw set for details), default is "system-plain" Option$ = "autocomplete" -- add the word Value$ to the auto-completion list +Option$ = "align" and value$ = "left|center|right" -- set the alignment for text in the textedit view. Related: textedit, textedit add, textedit clear, textedit color, textedit get, textedit get$ +&TextURL +& +texturl + +Name: +texturl -- Add a text link to a url. + +Synopsis: +TEXTURL x,y, ID$, Label$, Address$, View$ + +Description: +Set the web/email/ftp address at (x,y) with the label Label$ and the url Address$. +This widget is quite nice, it launches the appropriate application when clicked, it supports +a right-click popup-menu and you can drag the url to create either a person file or a bookmark. +Email can be either of the style: "mailto:foo@bar.com" or just "foo@bar.com" +A web url starts either with "http://" or with "file://" +And a ftp address starts with "ftp://" + +Related: texturl color +& +texturl color + +Name: +texturl color -- Set the color used for the text of a texturl. + +Synopsis: +TEXTURL COLOR TextURL$, Option$, r,g,b + + +Description: +Set the colors for the URL. Valid options are: +"Label" for the color of the label, +"Click" for the color of the label, when clicked and +"Mouse-over" for the color of the label, when the mouse is moved over the label. + +Related: texturl & tooltip @@ -7842,7 +8501,153 @@ Explanation: Here, the color of the tooltips are changed from the default yellow background and black text color to a black background (RGB color values: 0,0,0) and from the default black text color to a white text (RGB color values: 255,255,255). Related: tooltip +&Treebox & +treebox + +Name: +treebox -- Adds a treebox to a view. + +Sybopsis: +TREEBOX x1,y1 to x2,y2, ID$, ScrollbarType, View$ + +Description: +Adds a tree box. This behaves just like a LISTBOX but is able to show nested trees. + +Related: treebox add, treebox clear, treebox collapse, treebox count, treebox expand, treebox get$, treebox remove, treebox select, treebox sort +& +treebox add + +Name: +treebox add -- Add an item to a treebox. + +Synopsis: +TREEBOX ADD TreeBox$, RootItem$ +TREEBOX ADD TreeBox$, HeadItem$, ListItem$, IsExpanded + +Description: + +TREEBOX ADD TreeBox$, RootItem$ +Add the item RootItem$ to the top level of the tree. + +TREEBOX ADD TreeBox$, HeadItem$, ListItem$, IsExpanded +Add the item ListItem$ under the level of HeadItem$ of the tree. + +Related: treebox, treebox clear, treebox collapse, treebox count, treebox expand, treebox get$, treebox remove, treebox select, treebox sort +& +treebox clear + +Name: +treebox clear -- clear a treebox + +Synopsis: +TREEBOX CLEAR TreeBox$ + +Description: +Clear the tree. + +Related: treebox, treebox add, treebox collapse, treebox count, treebox expand, treebox get$, treebox remove, treebox select, treebox sort +& +treebox collapse + +Name: +treebox collapse -- Collapse a top level category. + +Synopsis: +TREEBOX COLLAPSE TreeBox$, Head$ + +Description: +Collapses Head$ in TreeBox$. + +Related: treebox, treebox add, treebox clear, treebox count, treebox expand, treebox get$, treebox remove, treebox select, treebox sort +& +treebox count + +Name: +treebox count -- count the entries in a treebox. + +Synopsis: +n = TREEBOX COUNT TreeBox$ + +Description: +Returns the number of entries in TreeBox$ + +Related: treebox, treebox add, treebox clear, treebox collapse, treebox expand, treebox get$, treebox remove, treebox select, treebox sort +& +treebox expand + +Name: +treebox expand -- Expand a category. + +Synopsis: +TREEBOX EXPAND TreeBox$, Head$ + +Description: +Expands Head$ in TreeBox$. + +Related: treebox, treebox add, treebox clear, treebox collapse, treebox count, treebox get$, treebox remove, treebox select, treebox sort + + +& +treebox get$ + +Name: +treebox get$ -- Get an item from a treebox. + +Synopsis: +Item$ = TREEBOX GET$ TreeBox$, Position + +Description: +Returns the Item$ at position Position in TreeBox$. + +Related: treebox, treebox add, treebox clear, treebox collapse, treebox count, treebox expand, treebox remove, treebox select, treebox sort +& +treebox remove + +Name: +treebox remove -- Remove an item from a treebox. + +Synopsis: +TREEBOX REMOVE TreeBox$, Position +TREEBOX REMOVE TreeBox$, Head$, ListItem$ + +Description: +TREEBOX REMOVE TreeBox$, Position +Removes the entry at position Position in TreeBox$. + +TREEBOX REMOVE TreeBox$, Head$, ListItem$ +Removes ListItem$ under Head$ in TreeBox$. + +Related: treebox, treebox add, treebox clear, treebox collapse, treebox count, treebox expand, treebox get$, treebox select, treebox sort +& +treebox select + +Name: +treebox select -- Select an item + +Synopsis: +TREEBOX SELECT TreeBox$, Position + +Description: +Selects theitem at position Position in TreeBox$. + +Related: treebox, treebox add, treebox clear, treebox collapse, treebox count, treebox expand, treebox get$, treebox remove, treebox sort +& +treebox sort + +Name: +treebox sort -- Sort the treebox. + +Synopsis: +TREEBOX SORT TreeBox$ + +Description: +Sorts the entries of TreeBox$ alphabetically. + + +Related: treebox, treebox add, treebox clear, treebox collapse, treebox count, treebox expand, treebox get$, treebox remove, treebox select + + &Localization & localize diff --git a/yab-IDE/data/Help_En_Index.dat b/yab-IDE/data/Help_En_Index.dat index 060d5d5..bf4a70c 100644 --- a/yab-IDE/data/Help_En_Index.dat +++ b/yab-IDE/data/Help_En_Index.dat @@ -1,662 +1,768 @@ &Arithmetic -7500 +7512 & -7502 +7514 abs() -7508 +7520 acos() -7875 +7887 and() -8374 +8386 asin() -9164 +9176 atan() -9673 +9685 bin$() -10572 +10584 cos() -11178 +11190 dec() -11443 +11455 eor() -11962 +11974 euler -12739 +12751 exp() -13145 +13157 frac() -13767 +13779 int() -14448 +14460 log() -14848 +14860 max() -15507 +15519 min() -16299 +16311 mod() -16714 +16726 or() -17427 +17439 pi -18220 +18232 ran() -18676 +18688 sig() -19519 +19531 sin() -20163 +20175 sqr() -20688 +20700 sqrt() -21059 +21071 tan() -21411 +21423 xor() -21774 +21786 ** or ^ -22807 +22819 & -23624 +23636 and -23628 +23640 break -24078 +24090 case -24773 +24785 continue -25270 +25282 default -25939 +25951 do -27059 +27071 else -27603 +27615 elsif -28142 +28154 end -29612 +29624 endif -30304 +30316 false -30950 +30962 fi -31517 +31529 for -31831 +31843 gosub -32793 +32805 goto -33663 +33675 if -34513 +34525 label -36299 +36311 loop -37288 +37300 next -37775 +37787 not -38334 +38346 on gosub -38986 +38998 on goto -40321 +40333 on interrupt -41745 +41757 logical or -43031 +43043 pause -43434 +43446 repeat -44662 +44674 return -45349 +45361 sleep -47048 +47060 step -47423 +47435 switch -47963 +47975 then -49279 +49291 true -50087 +50099 until -50523 +50535 wait -51130 +51142 wend -51504 +51516 while -52002 +52014 : -52658 +52670 & -53295 +53307 arraydim() -53306 +53318 arraysize() -54196 +54208 data -56769 +56781 dim -57721 +57733 read -59238 +59250 redim -59881 +59893 restore -60320 +60332 & -61389 +61401 asc() -61395 +61407 chr$() -62218 +62230 glob() -63080 +63092 abc matches a* -64041 +64053 -64229 +64241 hex$() -64238 +64250 instr() -64728 +64740 left$() -65742 +65754 len() -67043 +67055 lower$() -67417 +67429 ltrim$() -67825 +67837 rtrim$() -68477 +68489 mid$() -69125 +69137 right$() -70393 +70405 split() -71712 +71724 Please enter a line: a -74349 +74361 -74843 +74855 str$() -74869 +74881 string | Result for converting 1000*pi | Description -76275 +76287 -79672 +79684 token() -79974 +79986 Please enter a line: a -82497 +82509 -82895 +82907 trim$() -82922 +82934 upper$() -83535 +83547 val() -84183 +84195 & -84897 +84909 at() -84902 +84914 clear screen -86193 +86205 close -86909 +86921 color -87380 +87392 colour -88494 +88506 eof -88641 +88653 getscreen$() -89232 +89244 inkey$ -90380 +90392 input -91599 +91611 Please enter the name of a file to read: test.yab -92993 +93005 -93130 +93142 line input -93165 +93177 open -94007 +94019 print -97134 +97146 putscreen -100371 +100383 reverse -101266 +101278 screen -102045 +102057 seek() -102275 +102287 tell -103837 +103849 using -104498 +104510 # -105539 +105551 at() -106912 +106924 ; -108191 +108203 & -108837 +108849 end sub -108845 +108857 export -109277 +109289 import foo -110324 +110336 -110622 +110634 Calling subroutine foo.bar (okay) ... -110723 +110735 -111037 +111049 import -111572 +111584 rem Make the subroutine x easily available outside this library -112503 +112515 -112679 +112691 0 -112728 +112740 -112886 +112898 local -113171 +113183 numparams -114631 +114643 return -116082 +116094 static -117784 +117796 1 1 -118586 +118598 -118609 +118621 sub -118804 +118816 &Attributes -121093 +121105 & -121095 +121107 attribute clear -121111 +121123 attribute get -121350 +121362 attribute get$ -122081 +122093 attribute set -123739 +123751 bind() -124325 +124337 clipboard copy -125097 +125109 clipboard paste$ -125799 +125811 compile -126421 +126433 date$ -126977 +126989 doc -128702 +128714 docu$ -129857 +129869 error -130679 +130691 ---Error in t.yab, line 2: Oh no ... -131322 +131334 -131378 +131390 execute$() -131392 +131404 print foo$(a$,b$) -132427 +132439 -132440 +132452 execute() -132480 +132492 exit -132885 +132897 iscomputeron -133279 +133291 pause -133667 +133679 peek -134894 +134906 peek$ -140336 +140348 3a -143288 +143300 -143309 +143321 poke -143344 +143356 rem -144582 +144594 sleep -145696 +145708 system$() -146055 +146067 system() -146644 +146656 thread get -147267 +147279 thread remove -148616 +148628 time$ -149539 +149551 to -150708 +150720 // -151262 +151274 : -151766 +151778 &Bitmaps -152399 +152411 & -152401 +152413 bitmap -152408 +152420 bitmap color -152767 +152779 bitmap get -153119 +153131 bitmap image -156244 +156256 bitmap remove -156530 +156543 bitmap save -156757 +156771 screenshot -157154 +157168 -157399 +157414 -157409 +157424 draw bitmap -157423 +157438 draw circle -158360 +158304 draw curve -159019 +158963 draw dot -160004 +159948 draw ellipse -160585 +160529 draw flush -161324 +161268 draw get -162454 +162398 draw get$ -164400 +164344 draw image -165813 +165757 draw line -167719 +167663 draw rect -168291 +168235 draw set -168947 +168891 draw text -172316 +172260 & -173486 +173430 ismousein() -173498 +173442 keyboard message$() -174220 +174164 message$ -176109 +176053 message send -178442 -_Scripting:...| -179347 - -179360 +178386 mouse message$() -179587 +179509 mousemove$ -181611 +181533 mouse set -182267 +182189 shortcut -182773 +182695 "S" for the shift key -183573 +183495 -183725 +183647 "O" for ALT-O -183875 +183797 -183940 +183862 ALT-X -184364 +184286 -184407 +184329 &Printing -185358 +185280 & -185360 +185282 printer -185368 +185290 printer setup -187741 +187663 & -188765 +188687 menu -188770 +188692 Menu$ = "--" -189238 +189160 then the menu item will be a separator line. -189295 +189217 "S" for the shift key -189768 +189690 These modifiers can be combined, but the following combinations do not work: "SO", "SC" and "SCO" -190017 +189939 "O" for ALT-O -190068 +189990 -190133 +190055 For the menu Head$ "File": -190931 +190853 -191181 +191103 menu set -192273 +192195 Option$ = "Disable" -- grey out the item so it cannot be selected anymore -193076 +192998 -193225 +193147 popupmenu -194336 +194258 submenu -195984 +195906 Menu$ = "--" -196568 +196490 then the submenu item will be a separator line. -196628 +196550 "S" for the shift key -197104 +197026 These modifiers can be combined, but the following combinations do not work: "SO", "SC" and "SCO" -197353 +197275 "O" for ALT-O -197404 +197326 -197469 +197391 submenu set -200355 +200277 Option$ = "Disable" -- grey out the item so it cannot be selected anymore -201231 +201153 -201380 +201302 +&Boxview +202056 & -202127 +202058 boxview -202135 +202066 +boxview set +203491 canvas -203555 +203722 layout -203993 +204160 & -205118 +205382 scrollbar -205128 +205392 scrollbar get -205348 +205612 scrollbar set -205627 +205891 +& +207323 +splitview +207333 +splitview get +208271 +splitview set +208501 +& +209034 stackview -207066 +209044 stackview get -209180 +211158 stackview set -209471 +211449 & -209928 +211906 +tabview +211914 +tabview add +212194 +tabview get +213091 +tabview set +213290 +& +213474 +view +213479 +view dropzone +213623 +view get +213908 +view remove +214183 +& +214674 button -209935 +214681 button image -211250 +215996 calendar -212991 +217737 calendar get$ -214658 +219404 calendar set -215151 +219897 checkbox -215576 +220322 checkbox image -216833 +221579 checkbox set -219060 +223806 colorcontrol -219359 +224105 colorcontrol get -221381 +226127 colorcontrol set -221989 +226735 columnbox -222325 +227071 columnbox add -227535 +232281 columnbox clear -228716 +233462 columnbox color -229084 +233830 columnbox column -230129 +234875 columnbox count -231288 +236034 columnbox get -231726 +236472 columnbox get$ -232261 +237007 columnbox remove -232804 +237550 columnbox select -233161 -listbox -233616 -listbox add -236581 -listbox clear -237059 -listbox count -237354 -listbox get -237750 -listbox get$ -238237 -listbox remove -238655 -listbox select -238994 -listbox sort -239639 -radiobutton +237907 +& +238363 +dropbox +238371 +dropbox add +239576 +dropbox clear +239850 +dropbox count +240101 +dropbox get$ 240351 +dropbox remove +240645 +dropbox select +241204 +listbox +241483 +listbox add +244448 +listbox clear +244926 +listbox count +245221 +listbox get +245617 +listbox get$ +246104 +listbox remove +246522 +listbox select +246861 +listbox sort +247506 +& +248215 +option color +248228 +option set +248438 +radiobutton +249330 radiobutton set -242085 +251064 +& +251468 +slider +251475 +slider color +252196 +slider get +252619 +slider label +252846 +slider set +253097 +spincontrol +253709 +spincontrol get +254006 +spincontrol set +254236 statusbar -242491 +254456 statusbar set -243960 +255925 text -244458 +256423 text set -245646 +257611 +& +258733 +textcontrol +258745 +textcontrol clear +259270 +textcontrol get$ +259508 +textcontrol set +259800 textedit -246764 +260926 textedit add -247057 +261589 textedit clear -247269 +261801 textedit color -247611 +262143 textedit get -247913 +262445 textedit get$ -248268 +262800 textedit set -248542 +263074 +& +266124 +texturl +266132 +texturl color +266728 tooltip -251487 +267108 tooltip color -253167 -&Localization -254455 +268788 & -254457 +270071 +treebox +270079 +treebox add +270442 +treebox clear +270967 +treebox collapse +271230 +treebox count +271528 +treebox expand +271836 +treebox get$ +272119 +treebox remove +272446 +treebox select +272931 +treebox sort +273234 +& +273528 localize -254466 +273537 # A comment starts with a # -256030 +275101 -256154 +275225 translate$() -257720 +276791 &Sound -258473 +277544 & -258475 +277546 beep -258480 +277551 bell -258714 +277785 sound play -259077 +278148 sound stop -260002 +279073 sound wait -260376 +279447 &Window -260781 +279852 & -260783 +279854 alert -260789 +279860 filepanel -262567 +281638 window open -265857 +284928 window close -268572 +287643 window count -269064 +288135 window get -269691 +288762 window set -271412 +290483