It supports lots of widgets, handler and XML form export/import and generating FreeBASIC-Code.
Screenshots:
Mainwindow
Projectpanel:

Propertydialog
More information and downloads:
Visual WX-C Designer at FreeBASIC-Portal.de
petan wrote:... but no one has in examples needed things - scrolling very long text/file in window and scrolling very big image/picture.
Code: Select all
#Include "wx-c/wx.bi"
#Define wxCLOSE_BOX &h1000
#Define FALSE 0
#Define TRUE (NOT FALSE)
Declare Sub App_OnInit( )
Declare Sub App_OnExit( )
Dim Shared As wxApp Ptr wx_app
Dim Shared As wxFrame Ptr wx_frame
Dim Shared As wxPanel Ptr wx_panel
Sub App_OnInit( )
wx_frame = wxFrame( )
wxImage_InitAllHandlers( )
wxFrame_Create( wx_frame, 0, -1, "Example", wxSize( -1, -1 ), wxSize( 376, 396 ), wxDEFAULT_FRAME_STYLE Or wxCLOSE_BOX Xor wxMAXIMIZE_BOX Xor wxRESIZE_BORDER, "frame" )
wx_panel = wxPanel_ctor2( wx_frame, -1, wxSize( -1, -1 ), wxSize( -1, -1 ), 0, 0 )
''
'' create widget richtext0
''
Dim As wxTextCtrl Ptr richtext0
richtext0 = wxTextCtrl( )
wxTextCtrl_Create( richtext0, wx_panel, -1, "", wxSize( 10, 10 ), wxSize( 350, 350 ), wxTE_PROCESS_ENTER Or wxTE_MULTILINE Or wxTE_Rich Or wxTE_RICH2 Or wxVSCROLL Or wxHSCROLL, 0, 0 )
wxTextCtrl_SetValue( richtext0, !"foobarfoobarfoobarfoobar\nfoobarfoobar\n\n\n\nfoobarfoobar\n\n\n\nfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar\n\n\n\n\n\n\n\n\n\nfoobarfoobarfoobar\nfoobar\n\n\n\n\n\n\n\nfoobar" )
wxWindow_Show( wx_frame, 1 )
wxApp_OnInit( wx_app )
End Sub
Sub App_OnExit( )
wxApp_OnExit( wx_app )
End Sub
''main
wx_app = wxApp( )
wxApp_RegisterVirtual ( wx_app, Cast( Virtual_OnInit, @App_OnInit ), Cast( Virtual_OnExit, @App_OnExit ) )
wxApp_Run(0, 0)
End
petan wrote:@ TJF
Ok, and has it these examples directly in package ??, actually I have opened 3 projects under old good graphics and not too much time to learn new GUI program flow and coding.Easy understanding of new coding is high priority for change of my working style.
Pete
Code: Select all
' This is file gtk_applicationE110.bas, an example for GTK3
' (C) 2011 by Thomas[ dot ]Freiherr[ at ]gmx{ dot }net
' License GPLv 3
'
' See for details (A simple application)
' http://developer.gnome.org/gtk3/stable/GtkApplication.html
#INCLUDE ONCE "TJF/gtk.bi"
SUB new_window (BYVAL app AS GApplication PTR, _
BYVAL file AS GFile PTR)
VAR win = gtk_window_new (GTK_WINDOW_TOPLEVEL)
gtk_window_set_application (GTK_WINDOW (win), GTK_APPLICATION (app))
gtk_window_set_title (GTK_WINDOW (win), "Bloatpad")
VAR scrolled = gtk_scrolled_window_new (NULL, NULL)
VAR vie = gtk_text_view_new ()
gtk_container_add (GTK_CONTAINER (scrolled), vie)
gtk_container_add (GTK_CONTAINER (win), scrolled)
IF file THEN
DIM AS gchar PTR contents
DIM AS gsize length
IF g_file_load_contents (file, NULL, @contents, @length, NULL, NULL) THEN
VAR buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (vie))
gtk_text_buffer_set_text (buffer, contents, length)
g_free (contents)
END IF
END IF
gtk_widget_show_all (GTK_WIDGET (win))
END SUB
TYPE AS GtkApplication BloatPad
TYPE AS GtkApplicationClass BloatPadClass
G_DEFINE_TYPE (BloatPad, bloat_pad, GTK_TYPE_APPLICATION)
SUB bloat_pad_open CDECL(BYVAL app AS GApplication PTR, _
BYVAL files AS GFile PTR PTR, _
BYVAL n_files AS gint, _
BYVAL hint AS CONST gchar PTR)
FOR i AS gint = 0 TO n_files - 1
new_window (app, files[i])
NEXT
END SUB
SUB bloat_pad_activate CDECL(BYVAL app AS GApplication PTR)
new_window (app, NULL)
END SUB
SUB bloat_pad_finalize CDECL(BYVAL object AS GObject PTR)
G_OBJECT_CLASS (bloat_pad_parent_class)->finalize (object)
END SUB
SUB bloat_pad_init CDECL(BYVAL app AS BloatPad PTR)
END SUB
SUB bloat_pad_class_init CDECL(BYVAL clas AS BloatPadClass PTR)
G_OBJECT_CLASS(clas)->finalize = @bloat_pad_finalize
G_APPLICATION_CLASS(clas)->activate = @bloat_pad_activate
G_APPLICATION_CLASS(clas)->open_TJF = @bloat_pad_open
END SUB
FUNCTION bloat_pad_new () AS BloatPad PTR
g_type_init ()
RETURN g_object_new (bloat_pad_get_type (), _
"application-id", "org.gtk.Test.bloatpad", _
"flags", G_APPLICATION_HANDLES_OPEN, _
NULL)
END FUNCTION
VAR bloat_pad = bloat_pad_new ()
VAR status = g_application_run (G_APPLICATION (bloat_pad), __FB_ARGC__, __FB_ARGV__)
g_object_unref (bloat_pad)
END status
Users browsing this forum: No registered users and 1 guest