You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
(7) |
Mar
(5) |
Apr
(4) |
May
(15) |
Jun
(10) |
Jul
(4) |
Aug
(12) |
Sep
(39) |
Oct
(22) |
Nov
(46) |
Dec
(65) |
2002 |
Jan
(19) |
Feb
(27) |
Mar
(50) |
Apr
(73) |
May
(85) |
Jun
(52) |
Jul
(49) |
Aug
(95) |
Sep
(152) |
Oct
(81) |
Nov
(42) |
Dec
(62) |
2003 |
Jan
(45) |
Feb
(47) |
Mar
(101) |
Apr
(110) |
May
(53) |
Jun
(72) |
Jul
(125) |
Aug
(77) |
Sep
(87) |
Oct
(69) |
Nov
(55) |
Dec
(71) |
2004 |
Jan
(127) |
Feb
(68) |
Mar
(93) |
Apr
(102) |
May
(64) |
Jun
(92) |
Jul
(40) |
Aug
(113) |
Sep
(44) |
Oct
(61) |
Nov
(44) |
Dec
(100) |
2005 |
Jan
(57) |
Feb
(51) |
Mar
(101) |
Apr
(73) |
May
(45) |
Jun
(97) |
Jul
(92) |
Aug
(94) |
Sep
(46) |
Oct
(83) |
Nov
(82) |
Dec
(68) |
2006 |
Jan
(92) |
Feb
(116) |
Mar
(84) |
Apr
(66) |
May
(40) |
Jun
(57) |
Jul
(89) |
Aug
(82) |
Sep
(58) |
Oct
(94) |
Nov
(104) |
Dec
(70) |
2007 |
Jan
(86) |
Feb
(108) |
Mar
(193) |
Apr
(84) |
May
(71) |
Jun
(54) |
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-04-22 20:35:32
|
I'm trying to compile wxperl 0.11 with MingW and wxWindows 2.3.2 All the compilation of objects are fine, but when the link are made A = lot of functions doesn't have references!!! - wx2.3.3 are needed?! - the library libwxmsw232.a are libwx.a? - why make looks for libwxmsw232.a using the base dir -> = /lib/libwxmsw232.a ? |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-04-22 20:29:14
|
I use this to get the style flasg and set it to on_top: --------------------------------- my $style_def =3D $frame->GetWindowStyleFlag() ; my $style_top =3D $style_def|wxSTAY_ON_TOP ; =20 $frame->SetWindowStyleFlag( $style_top ); --------------------------------- But I need to know what style are in the $style_def to make more usefull = changes, like see if the window are on_top and cutout the on_top = manteining the other styles! How I do this if $style_def has only a = number reference for XS? Graciliano M. P. |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-04-22 20:22:59
|
Here are an example of text style in TextCtrl. Only for WxPerl 0.11 with = wxwindows2.3.3 (link of 0.11 beta: http://wwwstud.dsi.unive.it/~mbarbon/wx/) ------------------------------------------- use Wx qw(wxTE_MULTILINE wxTE_RICH2); use Wx qw(wxNORMAL wxRED wxBLUE wxLIGHT_GREY); my $text =3D Wx::TextCtrl->new( $HWX_app_obj{window} , -1, "", [0,0], = [500,400], wxTE_MULTILINE|wxTE_RICH2 ); ## The Style Flasg of TextCtrl need the option wxTE_RICH2 (to receive = text & background colors) or ## wxTE_RICH (to receive only text colors). =20 my $font =3D Wx::Font->new( 10 , wxDEFAULT , wxNORMAL , wxNORMAL , 0 , = 'Courier New' ); $text->SetFont( $font ) ; ## Set the defalt font. We ill use this font in the styles too. my $style_1 =3D Wx::TextAttr::new( undef , wxBLUE , wxNullColour , = $font ) ; my $style_2 =3D Wx::TextAttr::new( undef , wxRED , wxLIGHT_GREY , = $font ) ; $text->SetDefaultStyle( $style_1 ) ; ## Any text writed ill use this style (blue). $text->WriteText("Hello!!!\nText Style are working?!\n"); =20 $text->SetStyle( 0,7, $style_2 ) ; ## Set the style 2 (red) form char 0 to 7. =20 $text->Refresh ; ## refresh to update some idle drawing. ------------------------------------------- |
From: Mattia B. <mb...@ds...> - 2002-04-22 19:18:12
|
> Win2K > Perl 5.6.1 > wxWindows 2.2.9 > wxPerl 0.10 > > how do you determine the default window colour? the wxWindows docs point > at wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) but > wxSystemSettings does not seem to be supported by wxPerl (although ^^ no, by design ;-) what about Wx::SystemSettings::GetSystemColour > wxSYS_COLOUR_WINDOW does have an entry in _Exp.pm) Regards Mattia |
From: Dave R. <dav...@ma...> - 2002-04-22 18:17:43
|
Win2K Perl 5.6.1 wxWindows 2.2.9 wxPerl 0.10 how do you determine the default window colour? the wxWindows docs point at wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) but wxSystemSettings does not seem to be supported by wxPerl (although wxSYS_COLOUR_WINDOW does have an entry in _Exp.pm) thanks, /dave |
From: Nick J. <sk...@er...> - 2002-04-22 12:34:55
|
On Sun, 21 Apr 2002, Mattia Barbon wrote: > You forgot platform & wxPerl version, so I won't give you the solution ;-p > Win32, ActivePerl 5.6.1 build 628, wxPerl 0.09 -- sorry for not including before. > I see; this: the problem is that GetItemData takes the index of the item > $list->GetItemData( $ebent->GetIndex() ), or $event->GetData() works fine > > Yes, you can use the long as an index in an array ( or in an hash ) containing > the hashrefs, though. > Ok, so I should have a hash keyed on the long and then have the value for that key be a hashref? Could you provide some sample code, please? I would really appreciate it. I'm confused that the $id in my original code is always 0. I would really appreciate some sample code here. > > How can I associate a hashref with each item in a listctrl and how I > > can access this hashref when the item is "activated"? > See above > I would appreciate it if you could produce a simple snippet of code to illustrate this (inserting an item, storing its data in a global hash keyed on the long and then retrieving). I'm still pretty new to Wx and finding it pretty difficult. - Nick |
From: Mattia B. <mb...@ds...> - 2002-04-21 20:46:14
|
You forgot platform & wxPerl version, so I won't give you the solution ;-p > I have got a wxPerl application that contains a Wx::TreeCtrl and a > Wx::ListCtrl. Whenever a Wx::TreeCtrl item is activated, new items > are inserted in the list control. The "items" are stored as > data in the tree control. > > I am attempting to supply a hashref as data for each item in the > list control. So, in my EVT_TREE_SEL_CHANGED callback function > I have the following code: <snip> > Adding the actual *items* works fine (they display properly in the list). > The only problem is that setting the item data simply *does not work*. > Bizarrely, whenever I print out $id in the above function, it is > *always* zero. > > Anyway in my EVT_LIST_ITEM_ACTIVATED callback function I have: > > my $file_details = $object->{list}->GetItemData($event->GetItem()); > > but this causes a message box to appear saying: > > "Cannot retrieve information for list control item XXXXXXXX" (i.e. it > includes the item number). I see; this: the problem is that GetItemData takes the index of the item $list->GetItemData( $ebent->GetIndex() ), or $event->GetData() works fine > I think the problem is that there is no SetPlData etc. for listctrl like > there is for treectrl. The C++ documentation seems to show that > a listctrl item can only have a 'long' associated with it. Yes, you can use the long as an index in an array ( or in an hash ) containing the hashrefs, though. > How can I associate a hashref with each item in a listctrl and how I > can access this hashref when the item is "activated"? See above HTH Mattia |
From: Mattia B. <mb...@ds...> - 2002-04-21 20:45:58
|
Given that Perl programmers find wxWindows documentation ( written for C++ ) confusing, I'd like to know what exactly people think is confusing. Knowing that I may think some way of improving the documentation ( no promises, though ). Thanks Mattia |
From: Nick J. <sk...@er...> - 2002-04-21 14:52:58
|
I have got a wxPerl application that contains a Wx::TreeCtrl and a Wx::ListCtrl. Whenever a Wx::TreeCtrl item is activated, new items are inserted in the list control. The "items" are stored as data in the tree control. I am attempting to supply a hashref as data for each item in the list control. So, in my EVT_TREE_SEL_CHANGED callback function I have the following code: # Add items to list foreach (@{$object->{tree}->GetPlData($event->GetItem())}) { my $id = $object->{list}->InsertStringItem(0, $_->{name}); my %fileDetails = ( name => $_->{name}, abspath => $_->{abspath}, volume => $_->{volume} ); $object->{list}->SetItemData($id, \%fileDetails); $object->{list}->SetItem($id, 1, $_->{duration}); $object->{list}->SetItem($id, 2, $_->{title}); $object->{list}->SetItem($id, 3, $_->{artist}); $object->{list}->SetItem($id, 4, $_->{album}); $object->{list}->SetItem($id, 5, $_->{bitrate}); $object->{list}->SetItem($id, 6, (sprintf "%.2f", ($_->{size} / 1000000)) . ' MB'); } Adding the actual *items* works fine (they display properly in the list). The only problem is that setting the item data simply *does not work*. Bizarrely, whenever I print out $id in the above function, it is *always* zero. Anyway in my EVT_LIST_ITEM_ACTIVATED callback function I have: my $file_details = $object->{list}->GetItemData($event->GetItem()); but this causes a message box to appear saying: "Cannot retrieve information for list control item XXXXXXXX" (i.e. it includes the item number). I think the problem is that there is no SetPlData etc. for listctrl like there is for treectrl. The C++ documentation seems to show that a listctrl item can only have a 'long' associated with it. How can I associate a hashref with each item in a listctrl and how I can access this hashref when the item is "activated"? Thanks, Nick |
From: Mattia B. <mb...@ds...> - 2002-04-18 18:31:40
|
> Hi Mattia, > > Thanks for replying to my message: (see below) You're welcome! > Mattia Barbon wrote: > > > > > Has any one been succesful with building wxPerl on SGI? I get hundreds > > > of compilation errors: <snip> > > > SvREFCNT_inc( m_self ); > > > ^ > > > > > > cc-1367 CC: ERROR File = Grid.c, Line = 184 > > > A pointer to an incomplete class type is not allowed. > > > > > > bool show = (int)SvIV(ST(1)); <snip> > > * Is it a C or C++ compiler ( or both )? > > It is a C++ compiler (that can also handle C). > > > * If it is both, and uses the .c or .cpp ( or .cxx, or whatever ) to > > discriminate between C and C++, is there a way to force it to compile > > a .c file as C++? > > I am certain that it is treating the file as C++. When I tried "cc" > (instead of CC) it gave bunch of errors such as: > > cc-1020 cc: ERROR File = /usr/local/include/wx/defs.h, Line = 456 > The identifier "class" is undefined. > > class WXDLLEXPORT wxObject; > ^ Sigh, one easy solution gone > This is clearly a c verses c++ issue. However, when I use CC, then I > get bunch of errors that all seems to be related to SvREFCNT_inc, SvOK, > SvUV, SvPV_nolen, etc. In fact the first 40 errors all include the > mentioned names, all with the same message: > > A pointer to an incomplete class type is not allowed. > > > > > * if you do ( from the top level directory ) > > $ make Wx.c > > $ cp Wx.c Wx.cpp ( or .cxx or .cc ... ) > > $ make Wx.o > > CC ..... Wx.c > > I did, with no effect. Any other suggestions? I'm running short of suggestions :-( I think CC has a "preprocess to standard output" mode ( like gcc -E ) could you do $ CC --switch-to-preprocess-to-stdout ..options.. Wx.cpp > Wx.i and send Wx.i to me, ( better if gzipped )? Also: do a "make 2>&1 > make.log" and send the log to me. Another idea ( after you created the Wx.i and make.log ): in Wx.xs try replacing WXPL_EXTERN_C_START with extern "C" { WXPL_EXTERN_C_END with } and see what make Wx.o says Thanks Mattia |
From: Mattia B. <mb...@ds...> - 2002-04-18 12:23:29
|
> On Wednesday 17 April 2002 18:44, Mattia Barbon wrote: > > Well, no... there isn't ( currently ) any way to extend a FS handler. > > I'm currently over my head with work to catch up so I can't guarantee that > I'll have time to try it out, but I know I will need VFS functionality as > soon as I get back to work on my Wx project. Do you mean there is no way to > extend an _existing_ FS handler, or simply no way to create one (which I > understand could amount to exactly the same) ? There is ( and probably there wull never be ) a way to _extend_ [1] an existing wxWindows FS handler ( wxMemoryFSH, wxZipFSH, wxInternetFSH ); It is curently possible to use wxWindows C++ FS handlers. I'm implementing the interfaces allowing the creation of customized FS handlers written in Perl. > > If you are willing to test it ( I can provide binary snapshots > > compiled against wxWindows 2.2 and 2.3 ( pick one ) ), > > contact me off-list. > > If you get no testers in the days to come, get back to me off-list and I'll > try to fit the testing into a small time hole :) I've got another tester, thanks for the offer, anyway! Regards Mattia |
From: Farzin S. <ac...@ac...> - 2002-04-18 01:25:49
|
Hi Mattia, Thanks for replying to my message: (see below) Mattia Barbon wrote: > > > Has any one been succesful with building wxPerl on SGI? I get hundreds > > of compilation errors: > > > > CC -c -I../.. -I/usr/local/lib/wx/include/gtk-2.2 -I/usr/local/include > > -I. -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" > > -I/usr/freeware/lib/perl5/5.6.1/irix-n32/CORE -DWXPL_EXT > > -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_REENTRANT Grid.c > > cc-1367 CC: ERROR File = ../../cpp/helpers.h, Line = 272 > > A pointer to an incomplete class type is not allowed. > > > > SvREFCNT_inc( m_self ); > > ^ > > > > cc-1367 CC: ERROR File = Grid.c, Line = 184 > > A pointer to an incomplete class type is not allowed. > > > > bool show = (int)SvIV(ST(1)); > Some questions: > > * Is CC it the same compiler that was used for wxGTK ( it should )? I am not certain what was used for wxGTK, since I downloaded it from http://freeware.sgi.com/index-by-alpha.html. This is pre-packaged installable distribution. I would imagine that it was compiled with CC. SGI has three compilers cc, CC and c89. > * Is it a C or C++ compiler ( or both )? It is a C++ compiler (that can also handle C). > * If it is both, and uses the .c or .cpp ( or .cxx, or whatever ) to > discriminate between C and C++, is there a way to force it to compile > a .c file as C++? I am certain that it is treating the file as C++. When I tried "cc" (instead of CC) it gave bunch of errors such as: cc-1020 cc: ERROR File = /usr/local/include/wx/defs.h, Line = 456 The identifier "class" is undefined. class WXDLLEXPORT wxObject; ^ This is clearly a c verses c++ issue. However, when I use CC, then I get bunch of errors that all seems to be related to SvREFCNT_inc, SvOK, SvUV, SvPV_nolen, etc. In fact the first 40 errors all include the mentioned names, all with the same message: A pointer to an incomplete class type is not allowed. > > * if you do ( from the top level directory ) > $ make Wx.c > $ cp Wx.c Wx.cpp ( or .cxx or .cc ... ) > $ make Wx.o > CC ..... Wx.c I did, with no effect. Any other suggestions? > ^C # stop it just after it outputs the command > $ CC .... Wx.cpp # the line compiling the file with Wx.c => Wx.cpp/.cxx/.cc ... > does it compile or not? > > Regards > Mattia Thanks again. Farzin |
From: Robin B. <ro...@kn...> - 2002-04-17 18:08:37
|
On Wednesday 17 April 2002 18:44, Mattia Barbon wrote: > Well, no... there isn't ( currently ) any way to extend a FS handler. I'm currently over my head with work to catch up so I can't guarantee that I'll have time to try it out, but I know I will need VFS functionality as soon as I get back to work on my Wx project. Do you mean there is no way to extend an _existing_ FS handler, or simply no way to create one (which I understand could amount to exactly the same) ? > If you are willing to test it ( I can provide binary snapshots > compiled against wxWindows 2.2 and 2.3 ( pick one ) ), > contact me off-list. If you get no testers in the days to come, get back to me off-list and I'll try to fit the testing into a small time hole :) -- _______________________________________________________________________ Robin Berjon <ro...@kn...> -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com ----------------------------------------------------------------------- Lavish spending can be disastrous. Don't buy lavishes for a while. |
From: Mattia B. <mb...@ds...> - 2002-04-17 16:44:02
|
> Hi, > > Can anybody help translate the wx/samples/html/virtual/virtual.cpp > sample to wxPerl? Well, no... there isn't ( currently ) any way to extend a FS handler. I can add it to 0.11, but I'd like someone to test it ( I will write some contrived tests, of course, but it would be better to test it in real world use, and it looks like you can do it :-) ) If you are willing to test it ( I can provide binary snapshots compiled against wxWindows 2.2 and 2.3 ( pick one ) ), contact me off-list. Thanks! Mattia |
From: Mattia B. <mb...@ds...> - 2002-04-17 16:44:00
|
> Has any one been succesful with building wxPerl on SGI? I get hundreds > of compilation errors: > > CC -c -I../.. -I/usr/local/lib/wx/include/gtk-2.2 -I/usr/local/include > -I. -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" > -I/usr/freeware/lib/perl5/5.6.1/irix-n32/CORE -DWXPL_EXT > -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_REENTRANT Grid.c > cc-1367 CC: ERROR File = ../../cpp/helpers.h, Line = 272 > A pointer to an incomplete class type is not allowed. > > SvREFCNT_inc( m_self ); > ^ > > cc-1367 CC: ERROR File = Grid.c, Line = 184 > A pointer to an incomplete class type is not allowed. > > bool show = (int)SvIV(ST(1)); Some questions: * Is CC it the same compiler that was used for wxGTK ( it should )? * Is it a C or C++ compiler ( or both )? * If it is both, and uses the .c or .cpp ( or .cxx, or whatever ) to discriminate between C and C++, is there a way to force it to compile a .c file as C++? * if you do ( from the top level directory ) $ make Wx.c $ cp Wx.c Wx.cpp ( or .cxx or .cc ... ) $ make Wx.o CC ..... Wx.c ^C # stop it just after it outputs the command $ CC .... Wx.cpp # the line compiling the file with Wx.c => Wx.cpp/.cxx/.cc ... does it compile or not? Regards Mattia |
From: Marcus <li...@wo...> - 2002-04-17 02:34:06
|
Hi, Can anybody help translate the wx/samples/html/virtual/virtual.cpp sample to wxPerl? It's not a lot, but understanding it is a challenge :-) Take a look at the sample app, it's very cool. It creates HTML on-the-fly, like CGI. The author of wxHTML pointed me to the sample, which is unfortunately in C++. First the C++ code, followed by my Perl attempt: class MyVFS : public wxFileSystemHandler { public: MyVFS() : wxFileSystemHandler() {} wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); bool CanOpen(const wxString& location); }; ------------------------------------ I did this as: package MyVFS; use strict; use vars qw(@ISA); @ISA=qw(wxFileSystemHandler); use Wx qw(wxID_OK wxID_CANCEL); use Wx::FS; sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( @_ ); # No idea where the $fs and $location values would come from. $this->OpenFile( $fs, $location ); $this->CanOpen($location); # WDR: handler declarations for MyVFS $this; } # WDR: methods for MyVFS MyVFS::CanOpen($location) { return (GetProtocol(location) == "myVFS"); } # WDR: handler implementations for MyVFS --------------------------------------- I don't know if that was correct because I can't try it out yet. However, now I'm stuck. Especially with the wxFSFile bit below, not to mention the stuff about memory leaks in the comments. bool MyVFS::CanOpen(const wxString& location) { return (GetProtocol(location) == "myVFS"); } wxFSFile* MyVFS::OpenFile(wxFileSystem& fs, const wxString& location) { wxFSFile *f; wxInputStream *str; char *buf = (char*)malloc(1024); sprintf(buf, "<html><body><h2><i>You're in Node <u>%s</u></i></h2><p>" "Where do you want to go?<br><blockquote>" "<a href=\"%s-1\">sub-1</a><br>" "<a href=\"%s-2\">sub-2</a><br>" "<a href=\"%s-3\">sub-3</a><br>" "</blockquote></body></html>", location.GetData(), location.GetData(), location.GetData(), location.GetData()); // WARNING: wxMemoryInputStream will not free buf. // There is a memory leak here. str = new wxMemoryInputStream(buf, strlen(buf)); f = new wxFSFile(str, location, "text/html", wxEmptyString, wxDateTime::Today()); return f; } --------------------------------------- Otherwise, I think only the handler needs adding to OnInit, which should be: wxFileSystem::AddHandler(MyVFS->new); ------------------------------------ I've included the entire C++ file below, in case you don't have it handy (X:\wx\samples\html\virtual\virtual.cpp). Many Thanks, Marcus Here is the entire C++ file: //////////////////////////////////////////////////////////////////////// ///// // Name: virtua;.cpp // Purpose: wxHtml testing example // demonstrates virtual file systems feature //////////////////////////////////////////////////////////////////////// ///// #ifdef __GNUG__ #pragma implementation "test.cpp" #pragma interface "test.cpp" #endif // For compilers that support precompilation, includes "wx/wx.h". #include <wx/wxprec.h> #ifdef __BORLANDC__ #pragma hdrstop #endif // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWindows headers #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include <wx/html/htmlwin.h> // new handler class: #include <wx/wfstream.h> #include <wx/mstream.h> class MyVFS : public wxFileSystemHandler { public: MyVFS() : wxFileSystemHandler() {} wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); bool CanOpen(const wxString& location); }; bool MyVFS::CanOpen(const wxString& location) { return (GetProtocol(location) == "myVFS"); } wxFSFile* MyVFS::OpenFile(wxFileSystem& fs, const wxString& location) { wxFSFile *f; wxInputStream *str; char *buf = (char*)malloc(1024); sprintf(buf, "<html><body><h2><i>You're in Node <u>%s</u></i></h2><p>" "Where do you want to go?<br><blockquote>" "<a href=\"%s-1\">sub-1</a><br>" "<a href=\"%s-2\">sub-2</a><br>" "<a href=\"%s-3\">sub-3</a><br>" "</blockquote></body></html>", location.GetData(), location.GetData(), location.GetData(), location.GetData()); // WARNING: wxMemoryInputStream will not free buf. // There is a memory leak here. str = new wxMemoryInputStream(buf, strlen(buf)); f = new wxFSFile(str, location, "text/html", wxEmptyString, wxDateTime::Today()); return f; } // ------------------------------------------------------------------------ ---- // private classes // ------------------------------------------------------------------------ ---- // Define a new application type, each program should derive a class from wxApp class MyApp : public wxApp { public: // override base class virtuals // ---------------------------- // this one is called on application startup and is a good place for the app // initialization (doing it here and not in the ctor allows to have an error // return: if OnInit() returns false, the application terminates) virtual bool OnInit(); }; // Define a new frame type: this is going to be our main frame class MyFrame : public wxFrame { public: // ctor(s) MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); // event handlers (these functions should _not_ be virtual) void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); void OnBack(wxCommandEvent& event); void OnForward(wxCommandEvent& event); private: // any class wishing to process wxWindows events must use this macro DECLARE_EVENT_TABLE() }; // ------------------------------------------------------------------------ ---- // constants // ------------------------------------------------------------------------ ---- // IDs for the controls and the menu commands enum { // menu items Minimal_Quit = 1, Minimal_About, Minimal_Back, Minimal_Forward, // controls start here (the numbers are, of course, arbitrary) Minimal_Text = 1000, }; // ------------------------------------------------------------------------ ---- // event tables and other macros for wxWindows // ------------------------------------------------------------------------ ---- // the event tables connect the wxWindows events with the functions (event // handlers) which process them. It can be also done at run-time, but for the // simple menu events like this the static method is much simpler. BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Minimal_Quit, MyFrame::OnQuit) EVT_MENU(Minimal_About, MyFrame::OnAbout) EVT_MENU(Minimal_Back, MyFrame::OnBack) EVT_MENU(Minimal_Forward, MyFrame::OnForward) END_EVENT_TABLE() // Create a new application object: this macro will allow wxWindows to create // the application object during program execution (it's better than using a // static object for many reasons) and also declares the accessor function // wxGetApp() which will return the reference of the right type (i.e. MyApp and // not wxApp) IMPLEMENT_APP(MyApp) // ======================================================================== ==== // implementation // ======================================================================== ==== // ------------------------------------------------------------------------ ---- // the application class // ------------------------------------------------------------------------ ---- // `Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { // Create the main application window MyFrame *frame = new MyFrame("wxHtmlWindow testing application", wxPoint(50, 50), wxSize(640, 480)); // Show it and tell the application that it's our main window // @@@ what does it do exactly, in fact? is it necessary here? frame->Show(TRUE); SetTopWindow(frame); wxFileSystem::AddHandler(new MyVFS); // success: wxApp::OnRun() will be called which will enter the main message // loop and the application will run. If we returned FALSE here, the // application would exit immediately. return TRUE; } // ------------------------------------------------------------------------ ---- // main frame // ------------------------------------------------------------------------ ---- wxHtmlWindow *html; // frame constructor MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame((wxFrame *)NULL, -1, title, pos, size) { // create a menu bar wxMenu *menuFile = new wxMenu; wxMenu *menuNav = new wxMenu; menuFile->Append(Minimal_Quit, "E&xit"); menuNav->Append(Minimal_Back, "Go &BACK"); menuNav->Append(Minimal_Forward, "Go &FORWARD"); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar; menuBar->Append(menuFile, "&File"); menuBar->Append(menuNav, "&Navigate"); // ... and attach this menu bar to the frame SetMenuBar(menuBar); CreateStatusBar(1); html = new wxHtmlWindow(this); html -> SetRelatedFrame(this, "VFS Demo: '%s'"); html -> SetRelatedStatusBar(1); html -> LoadPage("start.htm"); } // event handlers void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { // TRUE is to force the frame to close Close(TRUE); } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { } void MyFrame::OnBack(wxCommandEvent& WXUNUSED(event)) { if (!html -> HistoryBack()) wxMessageBox("You reached prehistory era!"); } void MyFrame::OnForward(wxCommandEvent& WXUNUSED(event)) { if (!html -> HistoryForward()) wxMessageBox("No more items in history!"); } ----- Code End ---------------------------------- |
From: Farzin S. <ac...@ac...> - 2002-04-17 00:02:59
|
Has any one been succesful with building wxPerl on SGI? I get hundreds of compilation errors: CC -c -I../.. -I/usr/local/lib/wx/include/gtk-2.2 -I/usr/local/include -I. -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -I/usr/freeware/lib/perl5/5.6.1/irix-n32/CORE -DWXPL_EXT -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_REENTRANT Grid.c cc-1367 CC: ERROR File = ../../cpp/helpers.h, Line = 272 A pointer to an incomplete class type is not allowed. SvREFCNT_inc( m_self ); ^ cc-1367 CC: ERROR File = Grid.c, Line = 184 A pointer to an incomplete class type is not allowed. bool show = (int)SvIV(ST(1)); ^ ... Thanks. Farzin |
From: Mattia B. <mb...@ds...> - 2002-04-15 21:17:47
|
> I'm using Wx::Html. Everything works fine until you exit the program > and you get an exception error. If you comment out "LoadPage" in the > HTMLPage package below, then the error does not occur, but the HTML > window is created fine. Also, if you click on a link on the page, it does not crash, nice one, this one... > I'm guessing something is still open in Wx::HTML, but if so what? It > may be something else of course. I thought that, too; adding $this->{HTML} = $html; in the ctor an then $this->{HTML}->Destroy(); just before the $this->Destroy() in OnCloseWindow stops the crash. > Using wxPerl 0.10 on MSW with ActivePerl 623. Thanks for this. > Here is the code (created in part by wxDesigner, but no code relating > to Wx::HTML is in the _wdr.pl file). An for the test case. Regards Mattia |
From: Marcus <li...@wo...> - 2002-04-15 11:30:55
|
I'm using Wx::Html. Everything works fine until you exit the program and you get an exception error. If you comment out "LoadPage" in the HTMLPage package below, then the error does not occur, but the HTML window is created fine. I'm guessing something is still open in Wx::HTML, but if so what? It may be something else of course. Using wxPerl 0.10 on MSW with ActivePerl 623. Here is the code (created in part by wxDesigner, but no code relating to Wx::HTML is in the _wdr.pl file). use strict; use Wx; use Wx::Html; # Get the full path use FindBin; use lib $FindBin::RealBin; sub filename { "$FindBin::RealBin/" . $_[0] } # Read resource do 'html_wdr.pl'; # constants # WDR: classes # Load HTML page package HTMLPage; use strict; use vars qw(@ISA); @ISA = qw(Wx::HtmlWindow); use Wx qw(wxID_OK wxID_CANCEL); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( @_ ); $this->LoadPage(main::filename( 'html/index.html' ) ); # WDR: handler declarations for HTMLPage $this; } # WDR: methods for HTMLPage # WDR: handler implementations for HTMLPage sub OnLinkClicked { my( $this, $link ) = @_; # Show user the URL Wx::LogMessage( 'Link clicked: href="%s"', $link->GetHref() ); # Now go to link. This causes LoadPage to use "$link" $this->SUPER::OnLinkClicked( $link ); } package MyFrame; use strict; use vars qw(@ISA); @ISA=qw(Wx::Frame); use Wx::Event qw(EVT_MENU EVT_CLOSE EVT_SIZE EVT_UPDATE_UI); use Wx qw(wxOK wxICON_INFORMATION wxTB_HORIZONTAL wxNO_BORDER); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( @_ ); $this->CreateMyMenuBar(); $this->CreateStatusBar( 1 ); $this->SetStatusText( "Welcome!", 0); # insert main window here my ($html) = HTMLPage->new( $this, -1 ); # WDR: handler declarations for MyFrame EVT_MENU( $this, $main::ID_ABOUT, \&OnAbout ); EVT_MENU( $this, $main::ID_QUIT, \&OnQuit ); EVT_CLOSE( $this, \&OnCloseWindow ); $this; } # WDR: methods for MyFrame sub CreateMyMenuBar { my( $this ) = shift; $this->SetMenuBar( &main::MyMenuBarFunc() ); } # WDR: handler implementations for MyFrame sub OnAbout { my( $this, $event ) = @_; Wx::MessageBox( "Welcome to SuperApp 1.0\n(C)opyright Joe Hacker", "About SuperApp", wxOK|wxICON_INFORMATION, $this ); } sub OnQuit { my( $this, $event ) = @_; $this->Close(1); } sub OnCloseWindow { my( $this, $event ) = @_; $this->Destroy(); } package MyApp; use strict; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; Wx::InitAllImageHandlers(); my( $frame ) = MyFrame->new( undef, -1, "SuperApp", [20,20], [500,340] ); $frame->Show(1); 1; } package main; my( $app ) = MyApp->new(); $app->MainLoop(); |
From: Mattia B. <mb...@ds...> - 2002-04-10 08:01:45
|
This is a Win32-only binary snapshot. Use only if you know you need it. http://wwwstud.dsi.unive.it/~mbarbon/wx/ Regards mattia |
From: Marco T. <wx...@so...> - 2002-04-09 16:34:05
|
>Hi, > >I have just installed the PPM for wxPerl and I am downloading wxWindows. I would like to learn C++ using wxWindows but would also like to get started immediately using my Perl skills. > >My question is if I install wxWindows will I be creating DLL version conflicts/overwrite what the PPM installed? no, the wxPerl files are all in the directories: perl/site/lib/auto/Wx perl/site/lib/Wx and not to forget: perl/site/lib/Wx.pm greeting Marco |
From: Enye S. <MN...@Ja...> - 2002-04-09 16:16:02
|
Hi, I have just installed the PPM for wxPerl and I am downloading wxWindows. = I would like to learn C++ using wxWindows but would also like to get = started immediately using my Perl skills. My question is if I install wxWindows will I be creating DLL version = conflicts/overwrite what the PPM installed? Thanks for you help! Michael Nino Enye Software |
From: Mattia B. <mb...@ds...> - 2002-04-08 17:53:41
|
> >>Found a fix ( I hope ); download the modified wx22_9.dll from > >>http://wwwstud.dsi.unive.it/~mbarbon/wx/wx22_9.dll.gz <snip> > tried your dll too... > works fine until i start edit a treeItem with > $tree->EditLabel($selection); > after that it doesn't even work if i start edit it by clicking > twice with the mouse :-( Works for me... minimal.txt attached, right click on the tree ctrl to start editing. If you can moify it to meke it fail I'll try to correct it. Thanks for the patience! Mattia |
From: Mattia B. <mb...@ds...> - 2002-04-08 10:47:44
|
On Sun, 7 Apr 2002, Marco Trudel wrote: >>>Found a fix ( I hope ); download the modified wx22_9.dll from >>>http://wwwstud.dsi.unive.it/~mbarbon/wx/wx22_9.dll.gz >>>uncompress it and put it in $PERL/site/lib/auto/Wx >>>( make a backup of the original one, of course ). >>>This fixes your problem with tree control, but may introduce >>>new ones ( it is a fix backported from wxWIndows 2.3 ). >>> >>>Regards >>>Mattia <snip> >tried your dll too... >works fine until i start edit a treeItem with >$tree->EditLabel($selection); >after that it doesn't even work if i start edit it by clicking >twice with the mouse :-( Will have a look at it. >well, looks like i have to wait to the next wxPerl >what did you say? linked against wxwindows 2.3.3? >when do you think will it come out? 2.3.3 should be mid may AFAIR ( sorry, i don't have that mail at hand ) I could make a binary-only release for MSW with a CVS snapshot ( w/o docs ) but I can't make a linux release ( no official release -> no RPM ) >i look forward to it because the wxwindows bug with the >wxListCtrl headerlabels will be solved too... Regards mattia |
From: Mattia B. <mb...@ds...> - 2002-04-08 07:41:58
|
On Sun, 7 Apr 2002, Marco Trudel wrote: >>Found a fix ( I hope ); download the modified wx22_9.dll from >>http://wwwstud.dsi.unive.it/~mbarbon/wx/wx22_9.dll.gz >>uncompress it and put it in $PERL/site/lib/auto/Wx >>( make a backup of the original one, of course ). >>This fixes your problem with tree control, but may introduce >>new ones ( it is a fix backported from wxWIndows 2.3 ). >> >>Regards >>Mattia > >hey thanks man! >i had no time to work on my application but i checked the wxwindows >mailinglist archive. you asked for a code change as workaround... > >this week, while doing something totally different, i got an idea for such >a workaround... in fact we already had it: > >leave the line: >my $text = Wx::TextCtrl->new($configDialog,-1,'',[0,200],[500,100], wxTE_MULTILINE); >and set it to not visible: >$text->Show(0); Already tried that :) does not work >like i said, i had no time to try it... > >shit, hope your work wasn't unnecessary >but many thanks for that. really! Regards Mattia |