FLTK 1.3.x C Wrapper (obsolete)

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Post Reply
Drago
Posts: 116
Joined: Aug 10, 2005 13:15

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by Drago »

ah, ok :)

Code: Select all

#include once "fltk-c.bi"
sub myCallback cdecl (myButton as Fl_Widget ptr,myInput as any ptr)
  Fl_Input_SetValue myInput, "Test"
  Fl_Input_Resize myinput, 10,100,300,20
  Fl_WidgetRedraw myInput
end sub

var myWindow = Fl_WindowNew(320,160,"for Drago")
Fl_WidgetSetCallbackArg Fl_ButtonNew(10,10,300,30,"click me like a man"),@myCallback,Fl_InputNew(10,60,300,20)
Fl_WindowShow myWindow
Fl_Run
And what to call to remove the old widget representation at the old position? Fl_WindowRedraw
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

added: missing class Fl_Preferences

happy christmas

Joshy

Code: Select all

' ########################
' # class Fl_Preferences #
' ########################
declare function Fl_PreferencesNew(root as Fl_Root, vendor as const zstring ptr, application as const zstring ptr) as Fl_Preferences ptr
declare function Fl_PreferencesNew2(path as const zstring ptr, vendor as const zstring ptr, application as const zstring ptr) as Fl_Preferences ptr
declare function Fl_PreferencesNewGroup(parent as Fl_Preferences ptr, group as const zstring ptr) as Fl_Preferences ptr
declare function Fl_PreferencesNewGroup2(parent as Fl_Preferences ptr, groupIndex as integer) as Fl_Preferences ptr

declare sub      Fl_PreferencesDelete(byref pref as Fl_Preferences ptr)
declare sub      Fl_PreferencesFlush(pref as Fl_Preferences ptr)

declare function Fl_PreferencesClear(pref as Fl_Preferences ptr) as integer

declare function Fl_PreferencesSetInt    (pref as Fl_Preferences ptr, entry as const zstring ptr, value as integer) as integer
declare function Fl_PreferencesSetFloat  (pref as Fl_Preferences ptr, entry as const zstring ptr, value as single) as integer
declare function Fl_PreferencesSetFloat2 (pref as Fl_Preferences ptr, entry as const zstring ptr, value as single, precision as integer) as integer
declare function Fl_PreferencesSetDouble (pref as Fl_Preferences ptr, entry as const zstring ptr, value as double) as integer
declare function Fl_PreferencesSetDouble2(pref as Fl_Preferences ptr, entry as const zstring ptr, value as double, precision as integer) as integer
declare function Fl_PreferencesSetString (pref as Fl_Preferences ptr, entry as const zstring ptr, value as const zstring ptr) as integer
declare function Fl_PreferencesSetData   (pref as Fl_Preferences ptr, entry as const zstring ptr, value as const any ptr, size as integer) as integer

declare function Fl_PreferencesGetInt    (pref as Fl_Preferences ptr, entry as const zstring ptr, byref value as integer, defaultValue as integer) as integer
declare function Fl_PreferencesGetFloat  (pref as Fl_Preferences ptr, entry as const zstring ptr, byref value as single, defaultValue as single) as integer
declare function Fl_PreferencesGetDouble (pref as Fl_Preferences ptr, entry as const zstring ptr, byref value as double, defaultValue as double) as integer
declare function Fl_PreferencesGetString (pref as Fl_Preferences ptr, entry as const zstring ptr, byref value as zstring ptr, defaultValue as const zstring ptr) as integer
declare function Fl_PreferencesGetString2(pref as Fl_Preferences ptr, entry as const zstring ptr,       value as zstring ptr, defaultValue as const zstring ptr, maxSize as integer) as integer
declare function Fl_PreferencesGetData   (pref as Fl_Preferences ptr, entry as const zstring ptr, byref value as any ptr, defaultValue as const any ptr, defaultSize as integer) as integer
declare function Fl_PreferencesGetData2  (pref as Fl_Preferences ptr, entry as const zstring ptr,       value as any ptr, defaultValue as const any ptr, defaultSize as integer, maxSize as integer) as integer

declare function Fl_PreferencesGetSize(pref as Fl_Preferences ptr, entry as const zstring ptr) as integer
declare function Fl_PreferencesGetUserdataPath(pref as Fl_Preferences ptr, path as zstring ptr, pathlen as integer) as integer

declare function Fl_PreferencesEntryName(pref as Fl_Preferences ptr) as const zstring ptr
declare function Fl_PreferencesEntryPath(pref as Fl_Preferences ptr) as const zstring ptr

declare function Fl_PreferencesGroups(pref as Fl_Preferences ptr) as integer
declare function Fl_PreferencesGroup(pref as Fl_Preferences ptr, groupIndex as integer) as const zstring ptr
declare function Fl_PreferencesGroupExists(pref as Fl_Preferences ptr, key as const zstring ptr) as integer
declare function Fl_PreferencesDeleteGroup(pref as Fl_Preferences ptr, group as const zstring ptr) as integer
declare function Fl_PreferencesDeleteAllGroups(pref as Fl_Preferences ptr) as integer

declare function Fl_PreferencesEntries(pref as Fl_Preferences ptr) as integer
declare function Fl_PreferencesEntry(pref as Fl_Preferences ptr, entryIndex as integer) as const zstring ptr
declare function Fl_PreferencesEntryExists(pref as Fl_Preferences ptr, key as const zstring ptr) as integer
declare function Fl_PreferencesDeleteEntry(pref as Fl_Preferences ptr, entry as const zstring ptr) as integer
declare function Fl_PreferencesDeleteAllEntries(pref as Fl_Preferences ptr) as integer
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

First test of class Fl_Preferences (tested on Linux and Windows)

Joshy

Code: Select all

#include once "fltk-c.bi"

' test of class Fl_Preferences http://www.fltk.org/doc-1.3/classFl__Preferences.html

' create a preferences db
dim as Fl_Preferences ptr db = Fl_PreferencesNew(FL_Root.User,"vendor.xxx","myapp")
' create a group in the db 
dim as Fl_Preferences ptr group = Fl_PreferencesNewGroup(db,"mygroup")
' write some integer values
for i as integer=0 to 3
  Fl_PreferencesSetInt(group,"key_i_" & i,i)
next
' write a float value
Fl_PreferencesSetFloat(group,"key_f",123.4)
' write a double value
Fl_PreferencesSetDouble(group,"key_d",123.456789)
' write a double with precision count of 10
Fl_PreferencesSetDouble2(group,"key_d2",123.456789,10)
' write a string value
Fl_PreferencesSetString(group,"key_s","i'm a string")
' close the db
Fl_PreferencesDelete db

' open a preferences db
db = Fl_PreferencesNew(FL_Root.User,"vendor.xxx","myapp")
' open a group
group = Fl_PreferencesNewGroup(db,"mygroup")
' read some integers
dim as integer iValue
for i as integer=0 to 3
  Fl_PreferencesGetInt(group,"key_i_" & i,iValue,0)
  print iValue
next
' read a single value
dim as single fValue
Fl_PreferencesGetFloat(group,"key_f",fValue,0.0)
print fValue
' read a double value
dim as double dValue
Fl_PreferencesGetDouble(group,"key_d",dValue,0.0)
print dValue
' read a double value
Fl_PreferencesGetDouble(group,"key_d2",dValue,0.0)
print dValue
' read a string value
dim as zstring ptr sValue = callocate(255)
Fl_PreferencesGetString(group,"key_s",sValue,"")
print *sValue

Fl_PreferencesDelete db

sleep
here are the result
vendor.xxx/myapp.prefs wrote:; FLTK preferences file format 1.0
; vendor: vendor.xxx
; application: myapp

[.]


[./mygroup]

key_i_0:0
key_i_1:1
key_i_2:2
key_i_3:3
key_f:123.4
key_d:123.457
key_d2:123.456789
key_s:i'm a string
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

Image

Code: Select all

#include once "fltk-c.bi"

'test of:
' Fl_Text_DisplayHighlightData http://www.fltk.org/doc-1.3/classFl__Text__Display.html#ae09d61739b737a32868ffe0295a25dec

dim as Style_Table_Entry StyleTable(...) => _
{ (FL_BLUE      ,FL_COURIER,12)           , _ ' style 'A'
  (FL_DARK_RED  ,Fl_COURIER_ITALIC,12)    , _ ' style 'B'
  (Fl_DARK_GREEN,Fl_COURIER_BOLD_ITALIC,12) _ ' style 'C'
}  

dim as Fl_Window      ptr win = Fl_WindowNew(320,240, "Fl_Text_Editor02")
dim as Fl_Text_Buffer ptr CharBuffer = Fl_Text_BufferNew()
dim as Fl_Text_Buffer ptr StyleBuffer = Fl_Text_BufferNew()
dim as Fl_Text_Editor ptr edt = Fl_Text_EditorNew(10,10,Fl_WidgetGetW(win)-20,Fl_WidgetGetH(win)-20)
Fl_Text_DisplaySetBuffer edt,CharBuffer
Fl_Text_DisplayHighlightData edt,StyleBuffer,@StyleTable(0),3

Fl_Text_BufferSetText CharBuffer ,!"print \"hello , world\" ' comment"
Fl_Text_BufferSetText StyleBuffer,"AAAAA BBBBBBBBBBBBBBB CCCCCCCCC"

Fl_GroupSetResizable win,edt
Fl_WindowShow win
Fl_Run
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

added: class Fl_Overlay_Window

Joshy
Image

Code: Select all

#include once "fltk-c.bi"
' test of:
' Fl_Overlay_Window http://www.fltk.org/doc-1.3/classFl__Overlay__Window.html

dim shared as integer w=150,h=150

sub Draw_OverlayCB cdecl (self as any ptr)
  DrawSetColor(FL_RED)
  DrawRect((Fl_WidgetGetW(self)-w)/2,(Fl_WidgetGetH(self)-h)/2,w,h)
end sub

sub Button1CB cdecl (self as Fl_Widget ptr,ovl as any ptr)
  h+=20 : Fl_Overlay_WindowRedrawOverlay cptr(Fl_Overlay_Window ptr,ovl)
end sub

sub Button2CB cdecl (self as Fl_Widget ptr,ovl as any ptr)
  h-=20 : Fl_Overlay_WindowRedrawOverlay cptr(Fl_Overlay_Window ptr,ovl)
end sub

sub Button3CB cdecl (self as Fl_Widget ptr,ovl as any ptr)
  w+=20 : Fl_Overlay_WindowRedrawOverlay cptr(Fl_Overlay_Window ptr,ovl)
end sub

sub Button4CB cdecl (self as Fl_Widget ptr,ovl as any ptr)
  w-=20 : Fl_Overlay_WindowRedrawOverlay cptr(Fl_Overlay_Window ptr,ovl)
end sub


dim as  Fl_Overlay_WindowEx ptr win = Fl_Overlay_WindowExNew(400,400,"Fl_Overlay_WindowEx")
Fl_Overlay_WindowExSetDraw_OverlayCB win,@Draw_OverlayCB
Fl_WidgetSetCallbackArg Fl_ButtonNew( 50, 50,100,100,"wider")   ,@Button1CB,win
Fl_WidgetSetCallbackArg Fl_ButtonNew(250, 50,100,100,"narrower"),@Button2CB,win
Fl_WidgetSetCallbackArg Fl_ButtonNew( 50,250,100,100,"taller")  ,@Button3CB,win
Fl_WidgetSetCallbackArg Fl_ButtonNew(250,250,100,100,"shorter") ,@Button4CB,win
Fl_GroupSetResizable(win,win)

Fl_Overlay_WindowRedrawOverlay win
Fl_Overlay_WindowShow win
Fl_Run
Last edited by D.J.Peters on Dec 25, 2013 12:29, edited 1 time in total.
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

Image

Code: Select all

#include once "fltk-c.bi"

sub AdjusterCB cdecl (self as Fl_Widget ptr, box as any ptr)
  Fl_ValuatorFormat cptr(Fl_Valuator ptr,self), cptr(zstring ptr,Fl_WidgetGetLabel(box))
  Fl_WidgetRedraw box
end sub

'
' main
'
dim as string * 100 buf1,buf2
dim as Fl_Box      ptr b1,b2
dim as Fl_Adjuster ptr a1,a2
dim as Fl_Double_Window ptr win = Fl_Double_WindowNew(370,100,"click adjusters and drag ...")

b1 = Fl_BoxNew2(FL_DOWN_BOX,20,30,80,25,buf1): Fl_WidgetSetColor b1,FL_WHITE
a1 = Fl_AdjusterNew(30+80,30,3*25,25)
Fl_WidgetSetCallbackArg a1,@AdjusterCB,b1 : AdjusterCB a1,b1

b2 = Fl_BoxNew2(FL_DOWN_BOX,50+80+4*25,30,80,25,buf2) : Fl_WidgetSetColor b2,FL_WHITE
a2 = Fl_AdjusterNew(10+Fl_WidgetGetX(b2)+Fl_WidgetGetW(b2),10,25,3*25)
Fl_WidgetSetCallbackArg a2,@AdjusterCB,b2 : AdjusterCB a2,b2

Fl_WindowShow win
Fl_Run
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

ask.cxx wrote:This is a test to make sure automatic destructors work.
Pop up the question dialog several times and make sure it doesn't crash.
Also we test to see if the window exit callback works.

Code: Select all

#include once "fltk-c.bi"

' test of:
' flMessageTitle, flInput, flPassword, flChoice
' Fl_Return_Button, Fl_Button, Fl_WidgetAsWindow

sub update_input_text(wgt as Fl_Widget ptr, pInput as const zstring ptr)
  if (pInput) then
    Fl_WidgetCopyLabel wgt,pInput
    Fl_WidgetRedraw wgt
  end if
end sub

sub RenameMeCB cdecl (self as Fl_Widget ptr, pUserdata as any ptr)
  flMessageTitle("RenameMeCB")
  dim as const zstring ptr pInput = flInput("Input:", Fl_WidgetGetLabel(self))
  update_input_text(self, pInput)
end sub

sub RenameMePasswordCB cdecl (self as Fl_Widget ptr, pUserdata as any ptr)
  flMessageTitle("RenameMePasswordCB")
  dim as const zstring ptr pInput = flPassword("Input password:", Fl_WidgetGetLabel(self))
  update_input_text(self, pInput)
end sub

sub WindowCB cdecl (self as Fl_Widget ptr, pUserdata as any ptr)
  flMessageTitle("WindowCB")
  dim as integer rep = flChoice("Are you sure you want to quit?", "Cancel", "Quit", "Dunno")
  if (rep=1) then
    Fl_WindowHide Fl_WidgetAsWindow(self)
  elseif (rep=2) then
    flMessage("Well, maybe you should know before we quit.")
  end if
end sub

' 
' main
'
dim as zstring * 128 buffer1 = "Test text"
dim as zstring * 128 buffer2 = "MyPassword"
dim as Fl_Double_Window ptr win = Fl_Double_WindowNew(200,105)
Fl_WidgetSetCallback win,@WindowCB
Fl_WidgetSetCallback Fl_Return_ButtonNew(20, 10, 160, 35, buffer1),@RenameMeCB
Fl_WidgetSetCallback Fl_ButtonNew       (20, 50, 160, 35, buffer2),@RenameMePasswordCB
Fl_GroupSetResizable win,win
Fl_WindowShow win
Fl_Run
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

Image

Code: Select all

#include once "fltk-c.bi"

' test of:
' Fl_Wizard    http://www.fltk.org/doc-1.3/classFl__Wizard.html

sub WindowCB cdecl (self as Fl_Widget ptr, pUserdata as any ptr)
  Fl_WindowHide Fl_WidgetAsWindow(self)
end sub

sub BackCB cdecl (self as Fl_Widget ptr, wiz as any ptr)
  Fl_WizardPrev wiz
end sub

sub NextCB cdecl (self as Fl_Widget ptr, wiz as any ptr) 
  Fl_WizardNext wiz
end sub

sub DoneCB cdecl (self as Fl_Widget ptr, win as any ptr) 
  WindowCB win,0
end sub

'
' main
'
dim as Fl_Window ptr win = Fl_WindowNew(400,300,"Example Wizard")
dim as Fl_Wizard ptr wiz = Fl_WizardNew(0,0,400,300)
  dim as Fl_Multiline_Output ptr mOut
  dim as Fl_Group ptr grp

  ' Wizard: page 1
  grp = Fl_GroupNew(0,0,400,300)
    Fl_WidgetSetCallbackArg Fl_ButtonNew(290,265,100,25,"Next"),@NextCB,wiz
    mOut = Fl_Multiline_OutputNew(10,30,380,220,"Welcome")
    Fl_WidgetSetLabelSize mOut,20 : Fl_WidgetSetAlign mOut,FL_ALIGN_TOP or FL_ALIGN_LEFT
    Fl_Input_SetValue mOut,"This is First page"
  Fl_GroupEnd grp

  ' Wizard: page 2
  grp = Fl_GroupNew(0,0,400,300)
    Fl_WidgetSetCallbackArg Fl_ButtonNew(290,265,100,25,"Next"),@NextCB,wiz
    Fl_WidgetSetCallbackArg Fl_ButtonNew(180,265,100,25,"Back"),@BackCB,wiz
    mOut = Fl_Multiline_OutputNew(10,30,380,220,"Terms And Conditions")
    Fl_WidgetSetLabelSize mOut,20 : Fl_WidgetSetAlign mOut,FL_ALIGN_TOP or FL_ALIGN_LEFT
    Fl_Input_SetValue mOut,"This is the Second page"
  Fl_GroupEnd grp

  ' Wizard: page 3
  grp = Fl_GroupNew(0,0,400,300)
    Fl_WidgetSetCallbackArg Fl_ButtonNew(290,265,100,25,"Finish"),@DoneCB,win
    Fl_WidgetSetCallbackArg Fl_ButtonNew(180,265,100,25,"Back"),@BackCB,wiz
    mOut = Fl_Multiline_OutputNew(10,30,380,220,"Finish")
    Fl_WidgetSetLabelSize mOut,20 : Fl_WidgetSetAlign mOut,FL_ALIGN_TOP or FL_ALIGN_LEFT
    Fl_Input_SetValue mOut,"This is the Last page"
  Fl_GroupEnd grp
Fl_GroupEnd wiz

Fl_WindowEnd win
Fl_WidgetSetCallback win,@WindowCB
Fl_WindowShow win
Fl_Run
Merick
Posts: 1038
Joined: May 28, 2007 1:52

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by Merick »

Fl_Button.bas has a couple errors in line 10. First, FL_WINOW should be FL_WINDOW. Second, in the parameter list there's a "." instead of a ","
VANYA
Posts: 1866
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by VANYA »

Fl_Text_Editor02
Cool! Very Nice library!
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

Merick wrote:Fl_Button.bas has a couple errors in line 10. First, FL_WINOW should be FL_WINDOW. Second, in the parameter list there's a "." instead of a ","
It's ok now.

Image

Code: Select all

#include once "fltk-c.bi"

dim as zstring ptr cat_xpm(...) => { _
@"50 34 4 1", _
@"  c black", _
@"o c #ff9900", _
@"@ c #ffffff", _
@"# c None", _
@"##################################################", _
@"###      ##############################       ####", _
@"### ooooo  ###########################  ooooo ####", _
@"### oo  oo  #########################  oo  oo ####", _
@"### oo   oo  #######################  oo   oo ####", _
@"### oo    oo  #####################  oo    oo ####", _
@"### oo     oo  ###################  oo     oo ####", _
@"### oo      oo                     oo      oo ####", _
@"### oo       oo  ooooooooooooooo  oo       oo ####", _
@"### oo        ooooooooooooooooooooo        oo ####", _
@"### oo     ooooooooooooooooooooooooooo    ooo ####", _
@"#### oo   ooooooo ooooooooooooo ooooooo   oo #####", _
@"####  oo oooooooo ooooooooooooo oooooooo oo  #####", _
@"##### oo oooooooo ooooooooooooo oooooooo oo ######", _
@"#####  o ooooooooooooooooooooooooooooooo o  ######", _
@"###### ooooooooooooooooooooooooooooooooooo #######", _
@"##### ooooooooo     ooooooooo     ooooooooo ######", _
@"##### oooooooo  @@@  ooooooo  @@@  oooooooo ######", _
@"##### oooooooo @@@@@ ooooooo @@@@@ oooooooo ######", _
@"##### oooooooo @@@@@ ooooooo @@@@@ oooooooo ######", _
@"##### oooooooo  @@@  ooooooo  @@@  oooooooo ######", _
@"##### ooooooooo     ooooooooo     ooooooooo ######", _
@"###### oooooooooooooo       oooooooooooooo #######", _
@"###### oooooooo@@@@@@@     @@@@@@@oooooooo #######", _
@"###### ooooooo@@@@@@@@@   @@@@@@@@@ooooooo #######", _
@"####### ooooo@@@@@@@@@@@ @@@@@@@@@@@ooooo ########", _
@"######### oo@@@@@@@@@@@@ @@@@@@@@@@@@oo ##########", _
@"########## o@@@@@@ @@@@@ @@@@@ @@@@@@o ###########", _
@"########### @@@@@@@     @     @@@@@@@ ############", _
@"############  @@@@@@@@@@@@@@@@@@@@@  #############", _
@"##############  @@@@@@@@@@@@@@@@@  ###############", _
@"################    @@@@@@@@@    #################", _
@"####################         #####################", _
@"##################################################"}

function HandleCB cdecl (self as any ptr, e as Fl_Event) as integer
  static as integer ox = 0
  static as integer oy = 0
  select case e
  case Fl_Event.FL_PUSH
    ox = Fl_WidgetGetX(self) - Fl_EventX() ' save where user clicked for dragging
    oy = Fl_WidgetGetY(self) - Fl_EventY()
    return 1
  case Fl_Event.FL_RELEASE
    return 1
  case Fl_Event.FL_DRAG
    Fl_WidgetPosition self,ox+Fl_EventX(), oy+Fl_EventY() ' handle dragging
    Fl_WidgetRedraw Fl_WidgetWindow(self)
    return 1
  end select
  return 0
end function
'
' main
'
dim as Fl_Double_Window ptr win = Fl_Double_WindowNew(Fl_GetW()*0.75,Fl_GetH()*0.75,"dragable boxes")
dim as Fl_Scroll        ptr scl = Fl_ScrollNew(10,10,Fl_WidgetGetW(win)-20,Fl_WidgetGetH(win)-20)
dim as Fl_Pixmap        ptr cat = Fl_PixmapNew(@cat_xpm(0))
Fl_GroupBegin scl
  for y as integer =0 to 31
    for x as integer =0 to 31
       dim as Fl_BoxEx ptr box = Fl_BoxExNew(x*90,y*60,80,50)
       Fl_BoxExSetHandleCB box,@HandleCB
       Fl_WidgetSetImage   box,cat
       Fl_WidgetSetBox     box,cast(FL_Boxtype,int(rnd*40))
    next
  next
Fl_GroupEnd scl
Fl_GroupSetResizable win,scl
Fl_WindowShow win
Fl_Run
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

I changed Fl_Menu_Bar02.bas for Linux.

Joshy
ike
Posts: 387
Joined: Jan 17, 2011 18:59

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by ike »

Fl_Adjuster.bas
Fl_Adjuster.bas(4) error 159: Invalid assignment/conversion, at parameter 2 of FL_VALUATORFORMAT() in 'Fl_ValuatorFormat cptr(Fl_Valuator ptr,self), cptr(zstring ptr,Fl_WidgetGetLabel(box))'

Fl_Menu_Bar02.bas
Fl_Menu_Bar02.bas(31) error 159: Invalid assignment/conversion in 'dim as Fl_Menu_Item ptr mi = cptr(Fl_Menu_Item ptr,Fl_Menu_MValue(mnu))'
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by D.J.Peters »

Hello ike
I don't get any warnings here.

Joshy
Windows wrote:E:\CodeBlocks\joshy\fltk-c>fbc -version
FreeBASIC Compiler - Version 0.90.0 (06-23-2013) for win32
Copyright (C) 2004-2013 The FreeBASIC development team.
standalone

E:\CodeBlocks\joshy\fltk-c>fbc -w all Fl_Adjuster.bas
E:\CodeBlocks\joshy\fltk-c>fbc -w all Fl_Menu_Bar02.bas
E:\CodeBlocks\joshy\fltk-c>dir *.exe
29.12.2013 20:03 37.888 Fl_Adjuster.exe
29.12.2013 20:03 55.808 Fl_Menu_Bar02.exe
Linux wrote:bash-4.1$ su -c "cp *.so /usr/lib"
Password:
bash-4.1$ fbc -version
FreeBASIC Compiler - Version 0.90.0 (06-23-2013) for linux
Copyright (C) 2004-2013 The FreeBASIC development team.
bash-4.1$ fbc -w all Fl_Adjuster.bas
bash-4.1$ fbc -w all Fl_Menu_Bar02.bas
bash-4.1$ ls -la Fl_Adjuster
-rwxr-xr-x 1 joshy users 38752 Dez 29 20:12 Fl_Adjuster
bash-4.1$ ls -la Fl_Menu_Bar02
-rwxr-xr-x 1 joshy users 53496 Dez 29 20:12 Fl_Menu_Bar02
ike
Posts: 387
Joined: Jan 17, 2011 18:59

Re: FLTK C Wrapper (Fast Light Toolkit v 1.3.2)

Post by ike »

Joshi,

That is maybe because I use fb 0.24. I will try newest FB soon ...

Anyway, I like very much your work, and IMO this is best FB GUI. I try them all.
Small, fast and easy to use ...

I hope more people will start use it, so we can share examples - because there is couple thousand functions and subs ...

Very, very good work! Thank you!

IKE
Post Reply