Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI: Proof of concept with wx-c.dll
#11
Can get the wxTextCtrl control to work, but not the wxStyledTextCtrl control Cry
Does somebody have experience with the wxStyledTextCtrl control?
Reply
#12
if you add to libwx-c.bi:
Code:
...

const wxBOTH                  = &h0004 or &h0008

...

declare function wxWindow_CenterOnScreen cdecl alias "wxWindow_CenterOnScreen" ( byval self as integer, byval dir as integer ) as integer
declare function wxWindow_CenterOnParent cdecl alias "wxWindow_CenterOnParent" ( byval self as integer, byval dir as integer ) as integer

you can center the frame on the screen with
Code:
wxWindow_CenterOnScreen(wx_frame,wxBOTH)
in the appinit sub. 8)
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#13
here's a working example of wxStyledTextCtrl
Code:
'$include: "libwx-c.bi"

sub ButtonClick(byval event as long, byval iListener as long)
  
   wxMsgBox ( wx_frame, "Ouch!", "Clicky", 0, wxSize_ctor ( 150, 50 ))
  
end sub

sub App_OnInit ()

    wx_Frame = wxFrame_ctor ()

    wx_frame_pos  = wxSize_ctor ( 200, 200)
    wx_frame_size = wxSize_ctor ( 500, 300)

    wxFrame_Create (wx_Frame, 0, 1, "Welcome to WX-C", wx_frame_pos, wx_frame_size, wxDEFAULT_FRAME_STYLE, "frame" )

    wx_panel = wxPanel_ctor ()
    wxPanel_Create (wx_panel, wx_frame, 1, 0, 0, 0, 0)
    
    'make a button
    wx_Button=wxButton_ctor()
    wxButton_Create(wx_button,wx_Panel,2,"A button!",wxSize_ctor(10,10),wxSize_ctor(100,30),0,0,0)
    
    'button handler
    wxEvtHandler_proxy( wx_frame, @ButtonClick )
    wxEvtHandler_connect(wx_frame,wxEvent_EVT_COMMAND_BUTTON_CLICKED(),2,-1,0)
    
    wx_StyledText = wxStyledTextCtrl_ctor (wx_panel,3,wxSize_ctor(50,50),wxSize_ctor(300,100),0,0)
    wxStyledTextCtrl_CreateDocument(wx_StyledText)
    wxStyledTextCtrl_AddText(wx_StyledText,"Test!")
    
    'wx_statusbar=wxStatusBar_ctor ()
    'wxStatusBar_Create(wx_statusbar,wx_panel,3,0,0)
    'wxStatusBar_SetStatusText(wx_statusbar,"Hello yoyo!")

    wxWindow_CenterOnScreen(wx_frame,wxBOTH)
    wxWindow_Show ( wx_frame, 1)

end sub


sub App_OnExit()

    ' here your code executed on exit
    wx_msgbox_size = wxSize_ctor ( 150, 50)
    wxMsgBox ( wx_frame, "Bye Bye...", "Window Closed!", 0, wx_msgbox_size)

end sub

' main code...

  wx_app = wxApp_ctor()
  wxApp_RegisterVirtual ( wx_app, @App_OnInit, @App_OnExit)
  wxApp_Run()

end
and the header:
Code:
' remember:
' this file is far from finished...
'
'$inclib: "libwx-c"


' wxFrame/wxDialog style flags

const wxSTAY_ON_TOP           = &h8000
const wxICONIZE               = &h4000
const wxMINIMIZE              = wxICONIZE
const wxMAXIMIZE              = &h2000

' normally flag value &h1000 is free, but without &h1000
' there is no close button (X) so I named it wxCLOSE_BOX ... (by fsw)
const wxCLOSE_BOX             = &h1000  

const wxSYSTEM_MENU           = &h0800
const wxMINIMIZE_BOX          = &h0400
const wxMAXIMIZE_BOX          = &h0200
const wxTINY_CAPTION_HORIZ    = &h0100
const wxTINY_CAPTION_VERT     = &h0080
const wxRESIZE_BORDER         = &h0040

const wxDIALOG_NO_PARENT      = &h0001  ' Don't make owned by apps top window
const wxFRAME_NO_TASKBAR      = &h0002  ' No taskbar button (MSW only)
const wxFRAME_TOOL_WINDOW     = &h0004  ' No taskbar button, no system menu
const wxFRAME_FLOAT_ON_PARENT = &h0008  ' Always above its parent
const wxFRAME_SHAPED          = &h0010  ' Create a window that is able to be shaped

const wxCAPTION               = &h20000000
const wxCLIP_CHILDREN         = &h00400000

const wxBOTH                  = &h0004 or &h0008

const wxDEFAULT_FRAME_STYLE   = wxCLOSE_BOX OR wxSYSTEM_MENU OR wxRESIZE_BORDER OR wxMINIMIZE_BOX OR wxMAXIMIZE_BOX OR wxCAPTION OR wxCLIP_CHILDREN

declare function wxApp_ctor cdecl alias "wxApp_ctor" () as integer
declare function wxApp_RegisterVirtual cdecl alias "wxApp_RegisterVirtual" ( byval par1 as integer, byval par2 as integer, byval par3 as integer, ) as integer
declare function wxApp_Run cdecl alias "wxApp_Run" (  ) as integer 'byval par1 as integer, byval par2 as string ) as integer

declare function wxFrame_ctor cdecl alias "wxFrame_ctor" () as integer
declare function wxFrame_Create cdecl alias "wxFrame_Create" (byval self as integer, byval parent as integer, byval id as integer, byval title as string, byval pos as integer, byval size as integer, byval style as integer, byval name as string ) as integer

declare function wxPanel_ctor cdecl alias "wxPanel_ctor" () as integer
declare function wxPanel_Create cdecl alias "wxPanel_Create" (byval par1 as integer, byval par2 as integer, byval par3 as integer, byval par4 as integer, byval par5 as integer, byval par6 as integer, byval par7 as integer) as integer

declare function wxWindow_Show cdecl alias "wxWindow_Show" ( byval par1 as integer, byval par2 as integer ) as integer
declare function wxWindow_CenterOnScreen cdecl alias "wxWindow_CenterOnScreen" ( byval self as integer, byval dir as integer ) as integer
declare function wxWindow_CenterOnParent cdecl alias "wxWindow_CenterOnParent" ( byval self as integer, byval dir as integer ) as integer

declare function wxSize_ctor cdecl alias "wxSize_ctor" ( byval par1 as integer, byval par2 as integer ) as integer

declare function wxMsgBox cdecl alias "wxMsgBox" ( byval parent as integer, byval message as string, byval title as string, byval pos as integer, byval size as integer ) as integer

declare function wxButton_ctor cdecl alias "wxButton_ctor" () as integer
declare function wxButton_Create cdecl alias "wxButton_Create" ( byval self as integer, byval parent as integer, byval id as integer, byval label as string, byval position as integer, byval size as integer, byval style as integer, byval validator as integer, byval nme as string ) as integer

declare function wxEvtHandler_proxy cdecl alias "wxEvtHandler_proxy" ( byval self as integer, byval listener as integer ) as integer
declare function wxEvent_EVT_COMMAND_BUTTON_CLICKED cdecl alias "wxEvent_EVT_COMMAND_BUTTON_CLICKED" () as integer
declare function wxEvtHandler_Connect cdecl alias "wxEvtHandler_Connect" ( byval self as integer, byval evtType as integer, byval id as integer, byval lastId as integer, byval iListener as integer ) as integer

declare function wxStyledTextCtrl_ctor cdecl alias "wxStyledTextCtrl_ctor" (byval parent as integer, byval id as integer, byval poos as integer, byval size as integer, byval style as integer, byval naame as string) as integer
declare function wxStyledTextCtrl_CreateDocument cdecl alias "wxStyledTextCtrl_CreateDocument" (byval self as integer) as integer
declare function wxStyledTextCtrl_AddText cdecl alias "wxStyledTextCtrl_AddText" (byval self as integer, byval text as string) as integer

declare function wxStatusBar_ctor cdecl alias "wxStatusBar_ctor" () as integer
declare function wxStatusBar_Create cdecl alias "wxStatusBar_Create" (byval self as integer, byval parent as integer, byval id as integer, byval style as long, byval naame as string) as integer
declare function wxStatusBar_SetStatusText cdecl alias "wxStatusBar_SetStatusText" (byval self as integer, byval text as string) as integer
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#14
an even cooler example - lets you load a text file
Code:
'$include: "libwx-c.bi"
declare function fixstring(a as string) as string

dim shared wx_frame,wx_StyledText,wx_panel,wx_file,filename as string ptr,fname$

function fixstring(a as string) as string
  
   dim b as byte ptr,byt(20) as byte ptr
   b=sadd(a)
   byt(0)=b
   fixstring = *byt(0)
  
end function

sub ButtonClick(byval event as long, byval iListener as long)
  
   wxMsgBox ( wx_frame, "Ouch!", "Clicky", 0, wxSize_ctor ( 150, 50 ))
   wxStyledTextCtrl_InsertText(wx_StyledText,0,"An Uber-Cool ")
   wxFileDialog_ShowModal(wx_file)
   filename=wxFileDialog_GetPath(wx_file)
   fname$=fixstring(*filename)
   wxStyledTextCtrl_LoadFile(wx_StyledText,fname$)
  
end sub

sub App_OnInit ()

    wx_Frame = wxFrame_ctor ()

    wx_frame_pos  = wxSize_ctor ( 200, 200)
    wx_frame_size = wxSize_ctor ( 500, 300)

    wxFrame_Create (wx_Frame, 0, 1, "Welcome to WX-C", wx_frame_pos, wx_frame_size, wxDEFAULT_FRAME_STYLE, "frame" )

    wx_panel = wxPanel_ctor ()
    wxPanel_Create (wx_panel, wx_frame, 1, 0, 0, 0, 0)
    
    'make a button
    wx_Button=wxButton_ctor()
    wxButton_Create(wx_button,wx_Panel,2,"Load a file!",wxSize_ctor(10,10),wxSize_ctor(100,30),0,0,0)
    
    'button handler
    wxEvtHandler_proxy( wx_frame, @ButtonClick )
    wxEvtHandler_connect(wx_frame,wxEvent_EVT_COMMAND_BUTTON_CLICKED(),2,-1,0)
    
    wx_StyledText = wxStyledTextCtrl_ctor (wx_panel,3,wxSize_ctor(50,50),wxSize_ctor(400,150),0,0)
    wxStyledTextCtrl_CreateDocument(wx_StyledText)
    wxStyledTextCtrl_AddText(wx_StyledText,"Test!")
    
    wx_file=wxFileDialog_ctor(wx_panel,"open a text file now!!!","c:\","","*.txt",0,wxSize_ctor(0,0))
    
    'wx_statusbar=wxStatusBar_ctor ()
    'wxStatusBar_Create(wx_statusbar,wx_panel,3,0,0)
    'wxStatusBar_SetStatusText(wx_statusbar,"Hello!")

    wxWindow_CenterOnScreen(wx_frame,wxBOTH)
    wxWindow_Show ( wx_frame, 1)

end sub


sub App_OnExit()

    ' here your code executed on exit
    wx_msgbox_size = wxSize_ctor ( 150, 50)
    wxMsgBox ( wx_frame, "Bye Bye...", "Window Closed!", 0, wx_msgbox_size)

end sub

' main code...

  wx_app = wxApp_ctor()
  wxApp_RegisterVirtual ( wx_app, @App_OnInit, @App_OnExit)
  wxApp_Run()

end
and the header:
Code:
' remember:
' this file is far from finished...
'
'$inclib: "libwx-c"


' wxFrame/wxDialog style flags

const wxSTAY_ON_TOP           = &h8000
const wxICONIZE               = &h4000
const wxMINIMIZE              = wxICONIZE
const wxMAXIMIZE              = &h2000

' normally flag value &h1000 is free, but without &h1000
' there is no close button (X) so I named it wxCLOSE_BOX ... (by fsw)
const wxCLOSE_BOX             = &h1000  

const wxSYSTEM_MENU           = &h0800
const wxMINIMIZE_BOX          = &h0400
const wxMAXIMIZE_BOX          = &h0200
const wxTINY_CAPTION_HORIZ    = &h0100
const wxTINY_CAPTION_VERT     = &h0080
const wxRESIZE_BORDER         = &h0040

const wxDIALOG_NO_PARENT      = &h0001  ' Don't make owned by apps top window
const wxFRAME_NO_TASKBAR      = &h0002  ' No taskbar button (MSW only)
const wxFRAME_TOOL_WINDOW     = &h0004  ' No taskbar button, no system menu
const wxFRAME_FLOAT_ON_PARENT = &h0008  ' Always above its parent
const wxFRAME_SHAPED          = &h0010  ' Create a window that is able to be shaped

const wxCAPTION               = &h20000000
const wxCLIP_CHILDREN         = &h00400000

const wxBOTH                  = &h0004 or &h0008

const wxDEFAULT_FRAME_STYLE   = wxCLOSE_BOX OR wxSYSTEM_MENU OR wxRESIZE_BORDER OR wxMINIMIZE_BOX OR wxMAXIMIZE_BOX OR wxCAPTION OR wxCLIP_CHILDREN

declare function wxApp_ctor cdecl alias "wxApp_ctor" () as integer
declare function wxApp_RegisterVirtual cdecl alias "wxApp_RegisterVirtual" ( byval par1 as integer, byval par2 as integer, byval par3 as integer, ) as integer
declare function wxApp_Run cdecl alias "wxApp_Run" (  ) as integer 'byval par1 as integer, byval par2 as string ) as integer

declare function wxFrame_ctor cdecl alias "wxFrame_ctor" () as integer
declare function wxFrame_Create cdecl alias "wxFrame_Create" (byval self as integer, byval parent as integer, byval id as integer, byval title as string, byval pos as integer, byval size as integer, byval style as integer, byval name as string ) as integer

declare function wxPanel_ctor cdecl alias "wxPanel_ctor" () as integer
declare function wxPanel_Create cdecl alias "wxPanel_Create" (byval par1 as integer, byval par2 as integer, byval par3 as integer, byval par4 as integer, byval par5 as integer, byval par6 as integer, byval par7 as integer) as integer

declare function wxWindow_Show cdecl alias "wxWindow_Show" ( byval par1 as integer, byval par2 as integer ) as integer
declare function wxWindow_CenterOnScreen cdecl alias "wxWindow_CenterOnScreen" ( byval self as integer, byval dir as integer ) as integer
declare function wxWindow_CenterOnParent cdecl alias "wxWindow_CenterOnParent" ( byval self as integer, byval dir as integer ) as integer

declare function wxSize_ctor cdecl alias "wxSize_ctor" ( byval par1 as integer, byval par2 as integer ) as integer

declare function wxMsgBox cdecl alias "wxMsgBox" ( byval parent as integer, byval message as string, byval title as string, byval pos as integer, byval size as integer ) as integer

declare function wxButton_ctor cdecl alias "wxButton_ctor" () as integer
declare function wxButton_Create cdecl alias "wxButton_Create" ( byval self as integer, byval parent as integer, byval id as integer, byval label as string, byval position as integer, byval size as integer, byval style as integer, byval validator as integer, byval nme as string ) as integer

declare function wxEvtHandler_proxy cdecl alias "wxEvtHandler_proxy" ( byval self as integer, byval listener as integer ) as integer
declare function wxEvent_EVT_COMMAND_BUTTON_CLICKED cdecl alias "wxEvent_EVT_COMMAND_BUTTON_CLICKED" () as integer
declare function wxEvtHandler_Connect cdecl alias "wxEvtHandler_Connect" ( byval self as integer, byval evtType as integer, byval id as integer, byval lastId as integer, byval iListener as integer ) as integer

declare function wxStyledTextCtrl_ctor cdecl alias "wxStyledTextCtrl_ctor" (byval parent as integer, byval id as integer, byval poos as integer, byval size as integer, byval style as integer, byval naame as string) as integer
declare function wxStyledTextCtrl_CreateDocument cdecl alias "wxStyledTextCtrl_CreateDocument" (byval self as integer) as integer
declare function wxStyledTextCtrl_AddText cdecl alias "wxStyledTextCtrl_AddText" (byval self as integer, byval text as string) as integer
declare function wxStyledTextCtrl_InsertText cdecl alias "wxStyledTextCtrl_InsertText" (byval self as integer, byval poss as integer, byval text as string) as integer
declare function wxStyledTextCtrl_LoadFile cdecl alias "wxStyledTextCtrl_LoadFile" (byval self as integer, byval filename as string) as integer

declare function wxStatusBar_ctor cdecl alias "wxStatusBar_ctor" () as integer
declare function wxStatusBar_Create cdecl alias "wxStatusBar_Create" (byval self as integer, byval parent as integer, byval id as integer, byval style as long, byval naame as string) as integer
declare function wxStatusBar_SetStatusText cdecl alias "wxStatusBar_SetStatusText" (byval self as integer, byval text as string) as integer

declare function wxFileDialog_ShowModal cdecl alias "wxFileDialog_ShowModal" (byval self as integer) as integer
declare function wxFileDialog_ctor cdecl alias "wxFileDialog_ctor" (byval parent as integer, byval message as string, byval defaultDir as string, byval defaultFile as string, byval wildcard as string, byval flags as integer, byval poos as integer) as integer
declare function wxFileDialog_GetFilename cdecl alias "wxFileDialog_GetFilename" (byval self as integer) as string ptr
declare function wxFileDialog_GetPath cdecl alias "wxFileDialog_GetPath" (byval self as integer) as integer
('s getting big...)
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#15
It's looking good.

Keep in mind to change :
Code:
wxEvtHandler_proxy( wx_frame, @ButtonClick )
wxEvtHandler_connect(wx_frame,wxEvent_EVT_COMMAND_BUTTON_CLICKED(),2,-1,0)
to:
Code:
wxEvtHandler_proxy( wx_button, @ButtonClick )
wxEvtHandler_connect(wx_button,wxEvent_EVT_COMMAND_BUTTON_CLICKED(),2,-1,0)
otherwise you can't have several Controls with different event functions.

Keep up the good work Big Grin
Reply
#16
Here is the STATUS page of wx-c.dll (wx.net):
http://wxnet.sourceforge.net/status.html
As you can see there are still things missing, like OpenGL etc. or unfinished like wxTreeCtrl, but it's a start.
Hope we will have more stuff soon :wink:
Reply
#17
fsw:

do you think it would be possible to code a wrapper for the regular wxxwidgets without much difficulty? it might get rid of that 140-ish mb .net framework dependency for older machines.

also, i couldn't talk the menus into working. they don't seem to be handled correctly. all the samples show menu->Append to add stuff to a menu, but that doesn't exist in the wrapper. here's what i've managed to get to work:
Code:
'$include: "libwx-c.bi"
declare function fixstring(a as string) as string

dim shared wx_app,wx_frame,wx_StyledText,wx_panel,wx_file,filename as string ptr,fname$

function fixstring(a as string) as string
  
   dim b as byte ptr,byt(50) as byte ptr
   b=sadd(a)
   byt(0)=b
   fixstring = *byt(0)
  
end function

sub menu_openfile (byval event as long, byval listener as long)
   wxMsgBox ( wx_frame, "Ouch!", "Clicky", 0, wxSize_ctor ( 150, 50 ))
end sub

sub ButtonClick(byval event as long, byval iListener as long)
  
   wxMsgBox ( wx_frame, "Ouch!", "Clicky", 0, wxSize_ctor ( 150, 50 ))
   wxStyledTextCtrl_InsertText(wx_StyledText,0,"An Uber-Cool ")
   wxFileDialog_ShowModal(wx_file)
   filename=wxFileDialog_GetPath(wx_file)
   fname$=fixstring(*filename)
   if fname$<>"" then wxStyledTextCtrl_LoadFile(wx_StyledText,fname$):wxFrame_SetStatusText(wx_frame,fname$,1)
  
end sub

sub App_OnInit ()

    wx_Frame = wxFrame_ctor ()
    wxFrame_Create (wx_Frame, 0, 1, "Welcome to WX-C", wxSize_ctor ( 200, 200), wxSize_ctor ( 500, 300), wxDEFAULT_FRAME_STYLE, "frame" )
    
    wx_panel = wxPanel_ctor ()
    wxPanel_Create (wx_panel, wx_frame, 1, 0, 0, 0, 0)
    
    'make a button
    wx_Button=wxButton_ctor()
    wxButton_Create(wx_button,wx_Panel,2,"Load a file!",wxSize_ctor(10,10),wxSize_ctor(100,30),0,0,0)
    
    'button handler
    wxEvtHandler_proxy( wx_frame, @ButtonClick )
    wxEvtHandler_connect(wx_button,wxEvent_EVT_COMMAND_BUTTON_CLICKED(),2,-1,0)
    
    wx_StyledText = wxStyledTextCtrl_ctor (wx_panel,3,wxSize_ctor(50,50),wxSize_ctor(400,150),0,0)
    wxStyledTextCtrl_CreateDocument(wx_StyledText)
    wxStyledTextCtrl_AddText(wx_StyledText,"Test!")
    
    wx_file=wxFileDialog_ctor(wx_panel,"open a text file now!!!","c:\","","Text Documents (*.txt)|*.txt|FB sources (*.bas)|*.bas",0,wxSize_ctor(0,0))
    
    wxFrame_CreateStatusBar(wx_frame,2,0,3,"")
    'dim widths(0 to 1)
    'widths(0)=50:widths(1)=50
    'wxFrame_SetStatusWidths(wx_frame,widths())
    wxFrame_SetStatusText(wx_frame,"Test",0)
    wxFrame_SetStatusText(wx_frame,"No file currently opened.",1)
    
    wx_File_Menu=wxMenu_ctor("test",0)
    wx_file_menu2=wxMenu_ctor("test",0)
    'wxMenuItem_New(wx_OpenFile,wx_File_Menu,0,"File","tile",0,1)
    wx_Menubar=wxMenuBar_ctor(0)
    wx_OpenFile=wxMenuItem_ctor()
    wxMenuItem_New(wx_openfile,wx_file_menu,0,"text","some text eh",0,0)
    'wx_OpenFil=wxMenuItem_ctor(wx_Menubar,5,"Oppen","oppen a file",&h003,0)
    'wxMenu_Append(wx_file_menu,wx_openfile)
    'wxMenuItem_Toggle(wx_openfile)
    wxMenuItem_SetMenu(wx_openfile,wx_file_menu)
    'themenu=wxMenuItem_GetMenu(wx_OpenFile)
    wxMenuItem_SetText(wx_openfile,"text!")
    'dim thetext as string ptr
    'thetext=wxMenuItem_GetText(wx_openfile)
    'thetxt$=fixstring(*thetext)
    'print thetxt$,wx_openfile,themenu,wx_file_menu,wx_file_menu2
    wxMenuItem_Enable(wx_OpenFile,1)
    wxMenuBar_Append(wx_MenuBar,wx_File_Menu,"&File")
    wxMenuBar_Append(wx_MenuBar,wx_File_Menu2,"&Help")
    wxFrame_SetMenuBar(wx_frame, wx_menubar)
    
    'wx_toolbar=wxFrame_CreateToolBar(0,6,"")
    'wxToolBar_Realize(wx_toolbar)
    
    wxWindow_SetTitle( wx_frame,"Text Editor Test")
    wxWindow_CenterOnScreen(wx_frame,wxBOTH)
    wxWindow_Show ( wx_frame, 1)

end sub


sub App_OnExit()

    ' here your code executed on exit
    wx_msgbox_size = wxSize_ctor ( 150, 50)
    wxMsgBox ( wx_frame, "Bye Bye...", "Window Closed!", 0, wx_msgbox_size)

end sub

' main code...

  wx_app = wxApp_ctor()
  wxApp_RegisterVirtual ( wx_app, @App_OnInit, @App_OnExit)
  wxApp_Run()

end
header:
Code:
' remember:
' this file is far from finished...
'
'$inclib: "libwx-c"


' wxFrame/wxDialog style flags

const wxSTAY_ON_TOP           = &h8000
const wxICONIZE               = &h4000
const wxMINIMIZE              = wxICONIZE
const wxMAXIMIZE              = &h2000

' normally flag value &h1000 is free, but without &h1000
' there is no close button (X) so I named it wxCLOSE_BOX ... (by fsw)
const wxCLOSE_BOX             = &h1000  

const wxSYSTEM_MENU           = &h0800
const wxMINIMIZE_BOX          = &h0400
const wxMAXIMIZE_BOX          = &h0200
const wxTINY_CAPTION_HORIZ    = &h0100
const wxTINY_CAPTION_VERT     = &h0080
const wxRESIZE_BORDER         = &h0040

const wxDIALOG_NO_PARENT      = &h0001  ' Don't make owned by apps top window
const wxFRAME_NO_TASKBAR      = &h0002  ' No taskbar button (MSW only)
const wxFRAME_TOOL_WINDOW     = &h0004  ' No taskbar button, no system menu
const wxFRAME_FLOAT_ON_PARENT = &h0008  ' Always above its parent
const wxFRAME_SHAPED          = &h0010  ' Create a window that is able to be shaped

const wxCAPTION               = &h20000000
const wxCLIP_CHILDREN         = &h00400000

const wxBOTH                  = &h0004 or &h0008

const wxDEFAULT_FRAME_STYLE   = wxCLOSE_BOX OR wxSYSTEM_MENU OR wxRESIZE_BORDER OR wxMINIMIZE_BOX OR wxMAXIMIZE_BOX OR wxCAPTION OR wxCLIP_CHILDREN

declare function wxApp_ctor cdecl alias "wxApp_ctor" () as integer
declare function wxApp_SetAppName cdecl alias "wxApp_SetAppName" (byval self as integer,byval naame as string) as integer
declare function wxApp_RegisterVirtual cdecl alias "wxApp_RegisterVirtual" ( byval par1 as integer, byval par2 as integer, byval par3 as integer, ) as integer
declare function wxApp_Run cdecl alias "wxApp_Run" (  ) as integer 'byval par1 as integer, byval par2 as string ) as integer

declare function wxFrame_ctor cdecl alias "wxFrame_ctor" () as integer
declare function wxFrame_Create cdecl alias "wxFrame_Create" (byval self as integer, byval parent as integer, byval id as integer, byval title as string, byval pos as integer, byval size as integer, byval style as integer, byval name as string ) as integer
declare function wxFrame_CreateStatusBar cdecl alias "wxFrame_CreateStatusBar" (byval self as integer, byval number as integer, byval style as integer, byval id as integer, byval naame as string) as integer
declare function wxFrame_SetStatusText cdecl alias "wxFrame_SetStatusText" (byval self as integer, byval value as string, byval pane as integer) as integer
declare function wxFrame_SetStatusBarPane cdecl alias "wxFrame_SetStatusBarPane" (byval self as integer, byval value as integer) as integer
declare function wxFrame_SetStatusWidths cdecl alias "wxFrame_SetStatusWidths" (byval self as integer, widths() as integer) as integer
declare function wxFrame_SetMenuBar cdecl alias "wxFrame_SetMenuBar" (byval self as integer, byval menubar as integer) as integer
declare function wxFrame_CreateToolBar cdecl alias "wxFrame_CreateToolBar" (byval style as integer, byval id as integer, byval naame as string) as integer
declare function wxToolBar_Realize cdecl alias "wxToolBar_Realize" (byval self as integer) as integer

declare function wxPanel_ctor cdecl alias "wxPanel_ctor" () as integer
declare function wxPanel_Create cdecl alias "wxPanel_Create" (byval par1 as integer, byval par2 as integer, byval par3 as integer, byval par4 as integer, byval par5 as integer, byval par6 as integer, byval par7 as integer) as integer

declare function wxWindow_Show cdecl alias "wxWindow_Show" ( byval par1 as integer, byval par2 as integer ) as integer
declare function wxWindow_CenterOnScreen cdecl alias "wxWindow_CenterOnScreen" ( byval self as integer, byval dir as integer ) as integer
declare function wxWindow_CenterOnParent cdecl alias "wxWindow_CenterOnParent" ( byval self as integer, byval dir as integer ) as integer
declare function wxWindow_SetTitle cdecl alias "wxWindow_SetTitle" ( byval self as integer, byval value as string ) as integer

declare function wxSize_ctor cdecl alias "wxSize_ctor" ( byval par1 as integer, byval par2 as integer ) as integer

declare function wxMsgBox cdecl alias "wxMsgBox" ( byval parent as integer, byval message as string, byval title as string, byval pos as integer, byval size as integer ) as integer

declare function wxButton_ctor cdecl alias "wxButton_ctor" () as integer
declare function wxButton_Create cdecl alias "wxButton_Create" ( byval self as integer, byval parent as integer, byval id as integer, byval label as string, byval position as integer, byval size as integer, byval style as integer, byval validator as integer, byval nme as string ) as integer

declare function wxEvtHandler_proxy cdecl alias "wxEvtHandler_proxy" ( byval self as integer, byval listener as integer ) as integer
declare function wxEvent_EVT_COMMAND_BUTTON_CLICKED cdecl alias "wxEvent_EVT_COMMAND_BUTTON_CLICKED" () as integer
declare function wxEvtHandler_Connect cdecl alias "wxEvtHandler_Connect" ( byval self as integer, byval evtType as integer, byval id as integer, byval lastId as integer, byval iListener as integer ) as integer

declare function wxStyledTextCtrl_ctor cdecl alias "wxStyledTextCtrl_ctor" (byval parent as integer, byval id as integer, byval poos as integer, byval size as integer, byval style as integer, byval naame as string) as integer
declare function wxStyledTextCtrl_CreateDocument cdecl alias "wxStyledTextCtrl_CreateDocument" (byval self as integer) as integer
declare function wxStyledTextCtrl_AddText cdecl alias "wxStyledTextCtrl_AddText" (byval self as integer, byval text as string) as integer
declare function wxStyledTextCtrl_InsertText cdecl alias "wxStyledTextCtrl_InsertText" (byval self as integer, byval poss as integer, byval text as string) as integer
declare function wxStyledTextCtrl_LoadFile cdecl alias "wxStyledTextCtrl_LoadFile" (byval self as integer, byval filename as string) as integer

declare function wxStatusBar_ctor cdecl alias "wxStatusBar_ctor" (byval parent as integer, byval id as integer, byval style as long, byval naame as string) as integer
declare function wxStatusBar_Create cdecl alias "wxStatusBar_Create" (byval self as integer, byval parent as integer, byval id as integer, byval style as long, byval naame as string) as integer
declare function wxStatusBar_SetStatusText cdecl alias "wxStatusBar_SetStatusText" (byval self as integer, byval text as string) as integer
declare function wxStatusBar_SetFieldsCount cdecl alias "wxStatusBar_SetFieldsCount" (byval self as integer, byval value as integer) as integer
'declare function wxStatusBar_SetStatusWidths cdecl alias "wxStatusBar_SetStatusWidths" (byval self as integer, value() as integer) as integer


declare function wxFileDialog_ShowModal cdecl alias "wxFileDialog_ShowModal" (byval self as integer) as integer
declare function wxFileDialog_ctor cdecl alias "wxFileDialog_ctor" (byval parent as integer, byval message as string, byval defaultDir as string, byval defaultFile as string, byval wildcard as string, byval flags as integer, byval poos as integer) as integer
declare function wxFileDialog_GetFilename cdecl alias "wxFileDialog_GetFilename" (byval self as integer) as string ptr
declare function wxFileDialog_GetPath cdecl alias "wxFileDialog_GetPath" (byval self as integer) as integer

declare function wxString_ctor cdecl alias "wxString_ctor" (byval str as string) as integer
declare function wxString_mb_str cdecl alias "wxString_mb_str" (byval wxstr as integer) as string

declare function wxMenu_ctor cdecl alias "wxMenu_ctor" (byval title as string, byval style as integer) as integer
declare function wxMenuBar_Append cdecl alias "wxMenuBar_Append" (byval self as integer, byval menu as integer, byval title as string) as integer
declare function wxMenuBar_ctor cdecl alias "wxMenuBar_ctor" (byval style as integer) as integer
declare function wxMenuItem_ctor cdecl alias "wxMenuItem_ctor" as integer'(byval parentMenu as integer, byval id as integer, byval text as string, byval help as string, byval kind as integer, byval subMenu as integer) as integer
declare function wxMenuItem_Enable cdecl alias "wxMenuItem_Enable" (byval self as integer, byval value as integer) as integer
declare function wxMenuItem_New cdecl alias "wxMenuItem_New" (byval self as integer, byval parentMenu as integer, byval id as integer, byval text as string, byval help as string, byval isCheckable as integer, byval subMenu as integer) as integer
'declare function wxMenu_Append cdecl alias "wxMenu_Append" (byval self as integer, byval child as integer) as integer
declare function wxMenuBase_ctor1 cdecl alias "wxMenuBase_ctor1" (byval titel as string, byval style as integer) as integer
declare function wxMenuBase_Append cdecl alias "wxMenuBase_Append" (byval self as integer, byval id as integer, byval item as string, byval help as string) as integer
declare function wxMenuBase_GetMenuBar cdecl alias "wxMenuBase_GetMenuBar" (byval self as integer) as integer
declare function wxMenuBase_Enable cdecl alias "wxMenuBase_Enable" (byval self as integer) as integer
declare function wxMenuBase_UpdateUI cdecl alias "wxMenuBase_UpdateUI" (byval self as integer) as integer
declare function wxMenuItem_GetMenu cdecl alias "wxMenuItem_GetMenu" (byval self as integer) as integer
declare function wxMenuItem_SetMenu cdecl alias "wxMenuItem_SetMenu" (byval self as integer, byval menu as integer) as integer
declare function wxMenuItem_Toggle cdecl alias "wxMenuItem_Toggle" (byval self as integer) as integer
declare function wxMenuItem_GetText cdecl alias "wxMenuItem_GetText" (byval self as integer) as string ptr
declare function wxMenuItem_SetText cdecl alias "wxMenuItem_SetText" (byval self as integer, byval value as string) as integer
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#18
It's a real pain without proper docs... Cry
Reply
#19
docs for plain old wxwidgets are at http://www.wxwidgets.org/manuals/2.4.2/w...m#classref (well, class references anyways).

if you want the docs for the wx-c functions, download the source for it, it's well commented, and as good a doc as you'll get for it.
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#20
just a simple question. do you guys actuly read all the code in those huge posts?.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)