Search found 702 matches

by Manolo
Fri Oct 25, 2019 3:53 pm
Forum: C++ Development
Topic: How to catch unicode text input in wxWidgets like wxTextCtrl on windows?
Replies: 3
Views: 167

Re: How to catch unicode text input in wxWidgets like wxTextCtrl on windows?

wxWindow can receive keyboard input, as wxTextCtrl does. See the keyboard sample. You can have a wxWindow (or one of its derivates) and handle its char-events. Joining chars you get the string. Also handle paste-event, you can get a string in just one event. But you have to draw the text on your own...
by Manolo
Fri Oct 25, 2019 3:41 pm
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 11
Views: 435

Re: problem with wxGLCanvas

As @doublemax told, the "double buffer" feature is provided by the OS, not glut needed. wxWidgtes allows you to set it, please read every class doc from this grup: https://docs.wxwidgets.org/trunk/group__group__class__gl.html Some more info in this post: https://forums.wxwidgets.org/viewtopic.php?f=...
by Manolo
Thu Oct 24, 2019 4:01 pm
Forum: Platform Related Issues
Topic: wxGTK + OpenGL + gtk3 + Display Scaling
Replies: 7
Views: 448

Re: wxGTK + OpenGL + gtk3 + Display Scaling

Fixed two months ago.
https://github.com/wxWidgets/wxWidgets/ ... 5283137a2f

Can you test it (as the patch uses gtk_widget_get_scale_factor() instead of gdk_monitor_get_scale_factor())?
by Manolo
Tue Oct 22, 2019 4:03 pm
Forum: Platform Related Issues
Topic: wxGTK + OpenGL + gtk3 + Display Scaling
Replies: 7
Views: 448

Re: wxGTK + OpenGL + gtk3 + Display Scaling

In that ticket #17391 you can read that OpenGL knows nothing about the scale of the display. The best way to go is also told there: use const wxSize sizeInPixels = GetClientSize() * GetContentScaleFactor(); . No need to use GDK_SCALE , which will affect also the normal GUI. Then use that sizeInPixel...
by Manolo
Fri Oct 11, 2019 5:03 pm
Forum: C++ Development
Topic: Using GetSizer and Size Event Handler to resize a drawing
Replies: 3
Views: 164

Re: Using GetSizer and Size Event Handler to resize a drawing

Any GetXXXX function pass some value to your variable; the other direction is SetXXXX. To draw something that fits into a rectangle you first need to know the dimensions of that rectangle. The dimensions (width, height) of the "available" part of a window (the client area, without toolbars, menus, c...
by Manolo
Thu Oct 03, 2019 2:49 pm
Forum: C++ Development
Topic: wxGLCanvas: weird update issue
Replies: 6
Views: 181

Re: wxGLCanvas: weird update issue

Some comments, just to set it clear. The best way to do wxGLCanvas update is to have a wxPaintEvent handler (i.e. void OnPaint(wxPaintEvent& evt) ) in your wxGLCanvas class. This is what @doublemax is asking to be sure. This OnPaint() will be called automatically by the OS when it needs the window t...
by Manolo
Mon Sep 16, 2019 12:52 pm
Forum: C++ Development
Topic: button right align by AddStretchSpacer not work
Replies: 6
Views: 209

Re: button right align by AddStretchSpacer not work

Tell the sizer how to align the buttons using some flag of https://docs.wxwidgets.org/trunk/classwx_sizer.html#wxsizer_flags pSizer_0_0->Add(new wxButton(this, wxID_OK, L"AAA"), 0, wxALIGN_RIGHT); pSizer_0_0->Add(new wxButton(this, wxID_CANCEL, L"BBB"),1, wxALIGN_RIGHT); Notice the "0" I added to th...
by Manolo
Sun Sep 08, 2019 12:50 pm
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 232

Re: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

Case 1 The task blocks everything, GUI included, until it's completed. Then code normally. No threads, no message-handling etc. This approach may only be user-friendly if the task finishes in less than a second. Case 2 The task blocks nothing. There are several ways. For example you may call wxYiel...
by Manolo
Mon Sep 02, 2019 5:51 pm
Forum: C++ Development
Topic: Enabling Stencil test
Replies: 2
Views: 108

Re: Enabling Stencil test

What wxWidgets can do about OpenGL can be read in the FAQ of "General Development", https://forums.wxwidgets.org/viewtopic.php?f=27&t=45552 there is an attribute to set up the stencil buffer size True. See the wx docs https://docs.wxwidgets.org/trunk/classwx_g_l_attributes.html Enabling/disabling th...
by Manolo
Fri Aug 30, 2019 3:38 pm
Forum: C++ Development
Topic: Regarding reading signed integer using wxDataInputStream
Replies: 1
Views: 65

Re: Regarding reading signed integer using wxDataInputStream

Some types use the overloaded "<<" operator:

Code: Select all

wxFileInputStream input( "mytext.dat" );
wxDataInputStream store( input );
wxInt32 ivar;
store >> ivar; // reads a signed integer
You can find these overloads at yourwxdir/include/wx/datstrm.h
by Manolo
Sat Aug 24, 2019 12:44 pm
Forum: Compiler / Linking / IDE Related
Topic: CreateProcess, The system cannot find the file specified error
Replies: 2
Views: 164

Re: CreateProcess, The system cannot find the file specified error

You do have a path to MSYS2: sytem variables path: ....;c:\devkitPro\msys2\usr\bin;... Delete it, restart the computer and try again. And best remove leftovers of previous tries (this is what "clean" at the end of 'ming32-make' is supposed to do). If you don't plan to build wx many times, and will b...
by Manolo
Mon Aug 19, 2019 3:56 pm
Forum: Platform Related Issues
Topic: [wxGTK][wx3.1.2] Can't make GL context current in frame constructor
Replies: 1
Views: 171

Re: [wxGTK][wx3.1.2] Can't make GL context current in frame constructor

This is an old discussion. See https://trac.wxwidgets.org/ticket/16193 Some resume on it: There are three steps to go: a) Creating a gl-contex, which needs a "window" (in X11 this means a "drawable", not necessary a physical window). b) Setting the context as current. This is the point in discussion...
by Manolo
Mon Jun 24, 2019 4:04 pm
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 501

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

If the pyramid sample works for you I guess your issue is related to libraries linked. To find how pyramid gets compiled add >buildlog.txt >2&1 at the end of your command line ( x86_64-w64-mingw32-c++.exe -f makefile.gcc ...). Then, "buildlog.txt" will show the included dirs and linked libs. It seem...
by Manolo
Sat Jun 22, 2019 12:00 am
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 501

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

Mick P : ...they are expressly NOT using wxGLContext. Therefor, it seems logical to also not use wxGLCanvas... Please, stop adding confusion. The OP has problems with ' creating a openGL context in wxWidgets ', and some people (like me) are trying to help. To use OpenGL you need: 1) Create a window...