PDA

View Full Version : Simplified Windows API library


kornalius
09-07-2006, 07:54 PM
As many of you know, we are trying to make PPL a very*easy to use programming language. We've spent a lot of time applying this mentality to the language syntax and compiler/interpreter. However we neglected the windows api programming for GUI applications a bit.</p>

This is no more true with the Simplified Windows API library that we have just created. We took some of the functions that were there already and grouped them all into a nice simple library. This library will grow with time and will just get better.</p>

Here is an overview of what to expect in this library:</p><pre>proc ComboBox_Clear(combobox$)
func ComboBox_Count(combobox$)
func ComboBox_Add(combobox$, text$)
func ComboBox_Insert(combobox$, index$, text$)
func ComboBox_GetSel(combobox$)
proc ComboBox_SetSel(combobox$, index$)
func ComboBox_Del(combobox$, index$)
func ComboBox_Get(combobox$, index$)
proc ComboBox_Set(combobox$, index$, text$)
proc ComboBox_LoadFromList(combobox$, slist$)
proc ComboBox_SaveToList(combobox$, slist$)
proc ComboBox_LoadFromFile(combobox$, Filename$)
proc ComboBox_SaveToFile(combobox$, Filename$)</pre><pre>proc ListBox_Clear(listbox$)
func ListBox_Count(listbox$)
func ListBox_Add(listbox$, text$)
func ListBox_Insert(listbox$, index$, text$)
func ListBox_Del(listbox$, index$)
func ListBox_GetSel(listbox$)
func ListBox_GetSelCount(listbox$)
proc ListBox_SetSel(listbox$, index$)
func ListBox_Get(listbox$, index$)
proc ListBox_Set(listbox$, index$, text$)
proc ListBox_SelectAll(listbox$)
proc Listbox_LoadFromList(listbox$, slist$)
proc ListBox_SaveToList(listbox$, slist$)
proc ListBox_LoadFromFile(listbox$, filename$)
proc ListBox_SaveToFile(listbox$, filename$)</pre><pre>nfunc ListView_SetColumnOrder
func ListView_Count(ListView$)
func ListView_Clear(ListView$)
func ListView_GetSelCount(ListView$)
func ListView_GetColumnCount(ListView$)
func ListView_GetSel(ListView$)
proc ListView_SetSel(ListView$, index$)
func ListView_IsSelected(ListView$, index$)
proc ListView_Select(ListView$, index$)
func ListView_Get(ListView$, index$, item$)
func ListView_Set(ListView$, index$, item$, str$)
func ListView_AddColumn(ListView$, index$, str$, width$, fmt$)
func ListView_DelColumn(ListView$, index$)
proc ListView_Add(ListView$, text$)
proc ListView_Insert(ListView$, index$, text$)
func ListView_Del(ListView$, index$)
proc ListView_SelectAll(ListView$)
proc ListView_LoadFromList(ListView$, list$)
proc ListView_SaveToList(ListView$, list$)
proc ListView_LoadFromFile(ListView$, Filename$)
proc ListView_SaveToFile(ListView$, filename$)</pre><pre>func ProgressBar_SetRange(progressbar$, min$, max$)
func ProgressBar_GetRange(progressbar$, min$, max$)
func Progressbar_Get(progressbar$)
proc Progressbar_Set(progressbar$, index$)
proc Progressbar_SetStep(progressbar$, stepsize$)
func Progressbar_StepIt(progressbar$)
func Progressbar_StepDown(progressbar$, stepsize$)</pre><pre>proc Trackbar_Clear(trackbar$)
proc Trackbar_SetRange(trackbar$, min$, max$)
proc Trackbar_GetRange(trackbar$, min$, max$)
proc Trackbar_SetTickFreq(trackbar$, tickfreq$)
proc Trackbar_SetSelStart(trackbar$, selstart$)
proc Trackbar_SetSelEnd(trackbar$, selend$)
func Trackbar_GetSelStart(trackbar$)
func Trackbar_GetSelEnd(trackbar$)
func Trackbar_Get(trackbar$)
proc Trackbar_Set(trackbar$, index$)
proc Trackbar_StepUp(trackbar$, step$)
proc Trackbar_StepDown(trackbar$, step$)</pre><pre>func UpDown_GetBuddy(updown$)
proc UpDown_SetBuddy(updown$, buddy$)
func UpDown_Get(updown$, position$)
proc UpDown_Set(updown$, position$)
proc UpDown_GetRange(updown$, HiLimit$, LoLimit$)
proc UpDown_SetRange(updown$, HiLimit$, LoLimit$)</pre><pre>func TreeView_Count(TreeView$)
func TreeView_Clear(TreeView$)
func TreeView_GetSel(TreeView$)
proc TreeView_SetSel(TreeView$, handle$)
func TreeView_IsSelected(TreeView$, handle$)
proc TreeView_Select(TreeView$, handle$)
func TreeView_Get(TreeView$, handle$)
func TreeView_Set(TreeView$, handle$, str$)
func TreeView_Add(TreeView$, parenthandle$, text$)
proc TreeView_Insert(TreeView$, parenthandle$, text$)
func TreeView_Del(TreeView$, handle$)
proc TreeView_SelectAll(TreeView$, parent$)
proc TreeView_LoadFromList(TreeView$, list$)
proc TreeView_SaveToList(TreeView$, list$)
proc TreeView_LoadFromFile(TreeView$, Filename$)
proc TreeView_SaveToFile(TreeView$, filename$)</pre>

Solonn
09-08-2006, 09:42 AM
HUGE! :)

kornalius
09-08-2006, 05:08 PM
Will get bigger before release too. I will have more functions checkbox, radiobox, editbox, buttons etc...

kornalius
09-12-2006, 10:47 PM
Here is the latest SWAPI library.</p><pre>proc Button_Set(button$, checked$)
proc Button_Set(button$, checked$)
func Button_Get(button$)</pre><pre>func Edit_CanUndo(edit$)
func Edit_CharFromPos(edit$, x$, y$)
proc Edit_EmptyUndoBuffer(edit$)
func Edit_GetFirstVisibleLine(edit$)
func Edit_GetLimitText(edit$);
func Edit_GetLine(edit$, index$)
func Edit_Count(edit$)
func Edit_Modified(edit$)
func Edit_GetPasswordChar(edit$)
func Edit_GetSelStart(edit$)
func Edit_GetSelEnd(edit$)
proc Edit_LimitText(edit$, max$)
func Edit_LineFromChar(edit$, pos$)
func Edit_LineIndex(edit$, line$)
func Edit_LineLength(edit$, line$)
proc Edit_LineScroll(edit$, x$, y$)
func Edit_PosFromChar(edit$, charindex$)
func Edit_Get(edit$)
proc Edit_Set(edit$, text$)
proc Edit_ScrollCaret(edit$)
proc Edit_Modify(edit$, modified$)
proc Edit_SetPasswordChar(edit$, char$)
proc Edit_SetReadOnly(edit$, readonly$)
proc Edit_SetSelStart(edit$, start$)
proc Edit_SetSelEnd(edit$, end$)
proc Edit_CopyToClipboard(edit$)
proc Edit_CutFromClipboard(edit$)
proc Edit_PasteFromClipboard(edit$)
proc Edit_Undo(edit$)
proc Edit_SelectAll(edit$)
proc Edit_LoadFromList(edit$, slist$)
proc Edit_SaveToList(edit$, slist$)
proc Edit_LoadFromFile(edit$, Filename$)
proc Edit_SaveToFile(edit$, Filename$)</pre><pre>proc Menu_Add(menu$, id$, caption$)
proc Menu_Insert(menu$, before$, id$, caption$)
proc Menu_Check(menu$, id$, checked$)
func Menu_Create
proc Menu_Del(menu$, id$)
proc Menu_Destroy(menu$)
proc Menu_DrawMenuBar(hwnd$)
proc Menu_Enable(menu$, id$, enabled$)
func Menu_Checked(menu$, id$)
func Menu_Enabled(menu$, id$)
proc Menu_Set(menu$, id$, caption$)
func Menu_Get(menu$, id$)
func Menu_CreatePopup
proc Menu_TrackPopup(menu$, x$, y$)</pre><pre>proc ComboBox_Clear(combobox$)
func ComboBox_Count(combobox$)
func ComboBox_Add(combobox$, text$)
func ComboBox_Insert(combobox$, index$, text$)
func ComboBox_GetSel(combobox$)
proc ComboBox_SetSel(combobox$, index$)
func ComboBox_Del(combobox$, index$)
func ComboBox_Get(combobox$, index$)
proc ComboBox_Set(combobox$, index$, text$)
proc ComboBox_CopyToClipboard(combobox$)
proc ComboBox_CutFromClipboard(combobox$)
proc ComboBox_PasteFromClipboard(combobox$)
proc ComboBox_Undo(combobox$)
proc ComboBox_LoadFromList(combobox$, slist$)
proc ComboBox_SaveToList(combobox$, slist$)
proc ComboBox_LoadFromFile(combobox$, Filename$)
proc ComboBox_SaveToFile(combobox$, Filename$)</pre><pre>proc ListBox_Clear(listbox$)
func ListBox_Count(listbox$)
func ListBox_Add(listbox$, text$)
func ListBox_Insert(listbox$, index$, text$)
func ListBox_Del(listbox$, index$)
func ListBox_GetSel(listbox$)
func ListBox_GetSelCount(listbox$)
proc ListBox_SetSel(listbox$, index$)
func ListBox_Get(listbox$, index$)
proc ListBox_Set(listbox$, index$, text$)
proc ListBox_SelectAll(listbox$)
proc Listbox_LoadFromList(listbox$, slist$)
proc ListBox_SaveToList(listbox$, slist$)
proc ListBox_LoadFromFile(listbox$, filename$)
proc ListBox_SaveToFile(listbox$, filename$)</pre><pre>nfunc ListView_SetColumnOrder
func ListView_Count(ListView$)
func ListView_Clear(ListView$)
func ListView_GetSelCount(ListView$)
func ListView_GetColumnCount(ListView$)
func ListView_GetSel(ListView$)
proc ListView_SetSel(ListView$, index$)
func ListView_IsSelected(ListView$, index$)
proc ListView_Select(ListView$, index$)
func ListView_Get(ListView$, index$, item$)
func ListView_Set(ListView$, index$, item$, str$)
func ListView_AddColumn(ListView$, index$, str$, width$, fmt$)
func ListView_DelColumn(ListView$, index$)
proc ListView_Add(ListView$, text$)
proc ListView_Insert(ListView$, index$, text$)
func ListView_Del(ListView$, index$)
proc ListView_SelectAll(ListView$)
proc ListView_LoadFromList(ListView$, list$)
proc ListView_SaveToList(ListView$, list$)
proc ListView_LoadFromFile(ListView$, Filename$)
proc ListView_SaveToFile(ListView$, filename$)</pre><pre>func ProgressBar_SetRange(progressbar$, min$, max$)
func ProgressBar_GetRange(progressbar$, min$, max$)
func Progressbar_Get(progressbar$)
proc Progressbar_Set(progressbar$, index$)
proc Progressbar_SetStep(progressbar$, stepsize$)
func Progressbar_StepIt(progressbar$)
func Progressbar_StepDown(progressbar$, stepsize$)</pre><pre>proc Trackbar_Clear(trackbar$)
proc Trackbar_SetRange(trackbar$, min$, max$)
proc Trackbar_GetRange(trackbar$, min$, max$)
proc Trackbar_SetTickFreq(trackbar$, tickfreq$)
proc Trackbar_SetSelStart(trackbar$, selstart$)
proc Trackbar_SetSelEnd(trackbar$, selend$)
func Trackbar_GetSelStart(trackbar$)
func Trackbar_GetSelEnd(trackbar$)
func Trackbar_Get(trackbar$)
proc Trackbar_Set(trackbar$, index$)
proc Trackbar_StepUp(trackbar$, step$)
proc Trackbar_StepDown(trackbar$, step$)</pre><pre>func UpDown_GetBuddy(updown$)
proc UpDown_SetBuddy(updown$, buddy$)
func UpDown_Get(updown$, position$)
proc UpDown_Set(updown$, position$)
proc UpDown_GetRange(updown$, HiLimit$, LoLimit$)
proc UpDown_SetRange(updown$, HiLimit$, LoLimit$)</pre><pre>func TreeView_Count(TreeView$)
func TreeView_Clear(TreeView$)
func TreeView_GetSel(TreeView$)
proc TreeView_SetSel(TreeView$, handle$)
func TreeView_IsSelected(TreeView$, handle$)
proc TreeView_Select(TreeView$, handle$)
func TreeView_Get(TreeView$, handle$)
func TreeView_Set(TreeView$, handle$, str$)
func TreeView_Add(TreeView$, parenthandle$, text$)
proc TreeView_Insert(TreeView$, parenthandle$, text$)
func TreeView_Del(TreeView$, handle$)
proc TreeView_SelectAll(TreeView$, parent$)
proc TreeView_LoadFromList(TreeView$, list$)
proc TreeView_SaveToList(TreeView$, list$)
proc TreeView_LoadFromFile(TreeView$, Filename$)
proc TreeView_SaveToFile(TreeView$, filename$)</pre><pre>proc Rebar_Del(rebar$, band$)
func Rebar_Count(rebar$)
proc Rebar_Add(rebar$, caption$)
proc Rebar_Insert(rebar$, caption$, index$)</pre><pre>proc StatusBar_Set(statusbar$, caption$)
func StatusBar_Get(statusbar$)</pre><pre>proc Image_Set(image$, handle$)
func Icon_Set(icon$, handle$)</pre><pre>proc ScrollBar_SetRange(scrollbar$, min$, max$)
proc ScrollBar_GetRange(scrollbar$, min$, max$)
func ScrollBar_Get(scrollbar$)
proc ScrollBar_Set(scrollbar$, index$)</pre><pre>proc Tab_Clear(tab$)
proc Tab_Del(tab$, index$)
func Tab_GetSel(tab$)
proc Tab_SetSel(tab$, index$)
func Tab_Count(tab$)
proc Tab_Add(tab$, caption$)
proc Tab_Insert(tab$, caption$, index$)</pre><pre>func Image_Load(filename$)
func Icon_Load(filename$)</pre>