Google Summer of Code 2017 Project Ideas for wxWidgets
-
- Knows some wx things
- Posts: 49
- Joined: Wed May 13, 2009 8:08 am
Re: Google Summer of Code 2017 Project Ideas for wxWidgets
wxWidgets needs something like wxReportBuilder or Report System to create and print reports.
OS: Xubuntu 18.04, wxWidgets-3.1.0
-
- Super wx Problem Solver
- Posts: 469
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: Google Summer of Code 2017 Project Ideas for wxWidgets
If you really want a control like this, you can create a pseudo button by using wxRendererNative to draw a bitmap that looks like a button and then add images/text on top of it where ever you want. If you then handle mouse events and update the bitmap to pressed/active/etc states, it's almost indistinguishable from a real button. (Almost but not completely indistinguishable - there's a few states that a real button can have that the pseudo button lacks).Lowkus wrote:I was under the impression this was a list that could be amended anytime before the summer projects begin. If not, then please add this feature request to next year's list.
I wish I knew more about the implementation of buttons across operating systems, I don't have much knowledge to argue on my behalf in this matter. My gut instinct is that wxWidgets could draw all the button contents (text + graphics) onto a single bitmap and then put that bitmap onto the button face. That would allow complete control over the content displayed on the button across different operating systems without requiring native positioning API.
Regarding the complexity of the task, for students, I think it would be a very advanced task. It's not just a simple issue of modifying a few lines of code, it first requires understanding wxWidgets which could take a long time by itself, and then there is the actual coding which (if done using the method I mention above) requires merging bitmap and text into a composited bitmap - which might be simple for professional C++ devs but is not so simple for someone just learning to code. There would be a lot of testing needed, there would be documentation to be written, it would take a lot of the summer to get it all done.
I've done something similar in the past as an exercise in learning to use wxRendererNative.
Re: Google Summer of Code 2017 Project Ideas for wxWidgets
Thanks, I'll look into wxRendererNative. I'll probably have to put the rendered bitmap onto a button so that it looks native to the OS, but for other situations in the future I will happily use a non-native looking button.