Search found 99 matches

by Disch
Mon Oct 20, 2008 3:09 am
Forum: C++ Development
Topic: wxSizerItem::DeleteWindows
Replies: 4
Views: 565

wxSizerItem::DeleteWindows

I'm a little unclear as to exactly what this function does. Hopefully someone here has a quick answer for me. I have a big "master" sizer and many smaller sizers within it (each sizer containing even more sizers as well as windows). I need to remove entire entries from the master sizer and destroy t...
by Disch
Sun Oct 19, 2008 10:56 pm
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 4469

Hmm... yes that is very strange. I haven't run into any problems like that so I can't be of any help with that. Sorry.
by Disch
Sun Oct 19, 2008 9:04 pm
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 4469

First of all I need a wxWidgets object which I can implement in the current layout and which I can use with OpenGL. Maybe a panel or a frame is right for this. Well it probably should be wxGLCanvas if you want to have OpenGL rendering. But that canvas can be in another window, possibly a wxPanel, w...
by Disch
Sun Oct 19, 2008 6:40 pm
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 4469

You probably don't want to draw the Boids immediately after updating them like that. Update them all, then refresh the display (which draws them all). The Boids themselves should not be derived from wxGLContext. They are not windows/displays, so they shouldn't be derived from a window class. Instead...
by Disch
Sun Oct 19, 2008 4:45 pm
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 4469

I've no idea why but for me it seems that derive tons of classes form wxWidget to get stuff working is quite often use. Personally I dont like this way of programming and therefore I always search a way around this... Welcome to OOP =P. I used to be the same way, but really for window/widget progra...
by Disch
Sun Oct 19, 2008 3:09 pm
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 4469

Understanding the relationship between wxGLCanvas and wxGLContext can be a little weird. I see you're not even fiddling with wxGLContext in the code you've given (which you probably should, especially if you'll be drawing to several windows and want them to share common things like textures, display...
by Disch
Wed Oct 08, 2008 10:24 pm
Forum: C++ Development
Topic: Getting installed font directory
Replies: 7
Views: 1173

Bummer. I'm not really interested in solutions that aren't cross platform (to me, doing platform specific code kind of defeats the whole point of using a lib like wx). So thanks but no thanks. I have a fallback plan that will be a bit less user friendly, but should still work. I'll just have to have...
by Disch
Wed Oct 08, 2008 9:20 pm
Forum: C++ Development
Topic: Getting installed font directory
Replies: 7
Views: 1173

Because I need to load the font's .ttf file directly, which you can't get from the wxFontDialog. More specificially, this is for a font bitmapping process to generate bitmaps of fonts using the Freetype lib to generate and dump .png files of antialiased fonts which are to be later loaded into OpenGL...
by Disch
Tue Oct 07, 2008 5:11 pm
Forum: C++ Development
Topic: Getting installed font directory
Replies: 7
Views: 1173

Getting installed font directory

I have a situation where I need to load a font via it's .ttf file, but want to use wxFontDialog to have the user select the desired font. I searched and found this thread: http://forums.wxwidgets.org/viewtopic.php?t=19804 Which pretty much tells me wx cannot directly do what I want. However I began ...
by Disch
Fri Aug 15, 2008 4:21 am
Forum: C++ Development
Topic: Double-click blocking L Down events
Replies: 5
Views: 777

Ah ok i get it. Remember wxWidgets was designed for applications, not for games, yeah yeah yeah =P This isn't a game in the traditional sense though. It's a PC rendition of a board game, so widgets and other things wx is good at are everywhere. and in applications it often makes sense to treat doub...
by Disch
Fri Aug 15, 2008 12:37 am
Forum: C++ Development
Topic: Double-click blocking L Down events
Replies: 5
Views: 777

It's a sort of war strategy board game. You click on units to select them for a move. If you have 6 units on a territory, and you want to select 3 of them, you'd need to click on the units 3 times. Basically, I don't need any double-click events and want to treat everything like a series of single-c...
by Disch
Thu Aug 14, 2008 11:56 pm
Forum: C++ Development
Topic: Double-click blocking L Down events
Replies: 5
Views: 777

Double-click blocking L Down events

I'm working on a program which involves the user clicking on an area of the screen a number of times they want something (like if they want to select 4 things, they'd need to click 4 times). I was catching EVT_LEFT_DOWN() to detect individual clicks, but it doesn't work work how I expected it to. If...
by Disch
Sat Jul 19, 2008 10:29 pm
Forum: C++ Development
Topic: wxPNGHandler / wxImage: tRNS tag to alpha
Replies: 0
Views: 398

wxPNGHandler / wxImage: tRNS tag to alpha

I'm working on a program that involves the use of OpenGL textures and rendering. wx provides a PNG loader, which is great, but has a few style differences that make it hard to work directly with OpenGL. I can work around most of it, but one thing in paticular is bugging me. I need to be able to supp...
by Disch
Fri Feb 22, 2008 11:44 pm
Forum: C++ Development
Topic: wx stalling after modal dialog exits
Replies: 6
Views: 712

Can you reproduce that in a compilable minimal sample? Actually... no! I tried but my smaller sample worked fine. After tinkering around commenting out parts of the program that I suspected might be troublesome -- I've come to the realization that SDL Video was interfereing somehow. I use SDL Video...
by Disch
Fri Feb 22, 2008 7:44 pm
Forum: C++ Development
Topic: wx stalling after modal dialog exits
Replies: 6
Views: 712

That would require a good bit of shifting code around -- and I fail to see what difference it would make.

The fact that Go() is a member of dlg_inputlistner shouldn't matter. Since it's static -- it may as well be a global function... I just made it a static member for organizational sake.