Search found 309 matches

by New Pagodi
Thu Nov 14, 2019 11:55 pm
Forum: Platform Related Issues
Topic: mediactrl.Load always gives False
Replies: 16
Views: 370

Re: mediactrl.Load always gives False

I haven't tried it with soundfonts, but usually you can pass the same command line options to libvlc that you can pass to the VLC exe. (In the call to libvlc_new). https://wiki.videolan.org/VLC_command-line_help --soundfont=<string> SoundFont file For some reason, that doesn't seem to work. What I ...
by New Pagodi
Thu Nov 14, 2019 9:36 pm
Forum: Platform Related Issues
Topic: mediactrl.Load always gives False
Replies: 16
Views: 370

Re: mediactrl.Load always gives False

It looks like vlc will play midi files and that would probably be a better cross platform approach anyway.

However you need to specify a soundfont file. With the vlc binary this just requires setting an option. I cant quite figure out how to do this through the libvlc interface.
by New Pagodi
Wed Sep 04, 2019 10:56 pm
Forum: C++ Development
Topic: Can wxDC::DrawBitmap(...true) even draw bitmaps with alpha channels?
Replies: 10
Views: 205

Re: Can wxDC::DrawBitmap(...true) even draw bitmaps with alpha channels?

[/code]The RGB values must be pre-multiplied with alpha. writeIt.Red() = readIt->r * readIt->a / 256; I don't know if this matters, but the way building a wxBitmap from RGBA data is done in the wxSTC source is p.Red() = wxPy_premultiply(red, alpha); p.Green() = wxPy_premultiply(green, alpha); p.Blu...
by New Pagodi
Thu Aug 22, 2019 10:07 pm
Forum: Component Writing
Topic: Blender DAG node graph
Replies: 11
Views: 422

Re: Blender DAG node graph

No, I'm talking about native boxes where the user can input data themselves, not wxStaticText. Just like in the Blender picture above. One way to do this using the renderer/editor division of labor. wxWidgets uses this for wxGrid, wxDataViewCtrl, and wxPropgrid. The idea is to bring up the editor (...
by New Pagodi
Fri Aug 02, 2019 6:29 am
Forum: C++ Development
Topic: wxhtmlwindow alternative
Replies: 7
Views: 237

Re: wxhtmlwindow alternative

This still works with multiple colors. Here's a really simple example where the box just keeps the colors the same in the selection. class MyListBox:public wxHtmlListBox { public: MyListBox(wxWindow*); protected: virtual wxString OnGetItem (size_t n) const; virtual wxColour GetSelectedTextColour(con...
by New Pagodi
Fri Aug 02, 2019 1:46 am
Forum: C++ Development
Topic: wxhtmlwindow alternative
Replies: 7
Views: 237

Re: wxhtmlwindow alternative

I'm not really familiar with that control, but it looks like your supposed to override the method virtual wxColour GetSelectedTextColour(const wxColour &colFg) const to return the color to be used when the item is selected. I think the way it works is your return the selected color you want for the ...
by New Pagodi
Thu Aug 01, 2019 10:22 pm
Forum: C++ Development
Topic: Display text on wxGauge
Replies: 2
Views: 113

Re: Display text on wxGauge

This should be a class that looks like what you want. It hasn't been thoroughly tested though #include <wx/dcbuffer.h> #include <wx/renderer.h> class GaugeWithText:public wxWindow { public: GaugeWithText(){} GaugeWithText(wxWindow *parent, wxWindowID id, int range, const wxPoint &pos=wxDefaultPositi...
by New Pagodi
Tue Jul 30, 2019 6:19 am
Forum: C++ Development
Topic: wxhtmlwindow alternative
Replies: 7
Views: 237

Re: wxhtmlwindow alternative

by New Pagodi
Sat Jul 27, 2019 11:46 pm
Forum: C++ Development
Topic: wxStyleTextCtrl::SetLexer not setting lexer
Replies: 2
Views: 133

Re: wxStyleTextCtrl::SetLexer not setting lexer

There was a problem with the CMake files that left out compiling the lexers. It was fixed a while back, but vcpkg must still be using the old CMake files. i can't think of any way to fix this after the library has been build, so if you need the lexers, you'll probably need to build the wxWidgets lib...
by New Pagodi
Tue Jul 23, 2019 4:13 am
Forum: Compiler / Linking / IDE Related
Topic: How do I know which one (or what group) of .a files to link to?
Replies: 6
Views: 227

Re: How do I know which one (or what group) of .a files to link to?

alys666 wrote:
Tue Jul 23, 2019 4:05 am
there is a programm - wx-config
it intended to provide you with specific information(names, paths, options...) for wxWidgets application building process.
did you read about it?
https://wiki.wxwidgets.org/Wx-Config
wx-config currently doesn't work with the mingw family of compilers.
by New Pagodi
Tue Jul 23, 2019 4:12 am
Forum: Compiler / Linking / IDE Related
Topic: How do I know which one (or what group) of .a files to link to?
Replies: 6
Views: 227

Re: How do I know which one (or what group) of .a files to link to?

Generally, you'll always need to link with the base library. It should be named something like 'libwxbase31XX.a' where 'XX' might be some optional letters like that give more information about the build. For additional items, you can look up which library is needed in the documentation. For example,...
by New Pagodi
Thu Jul 18, 2019 5:12 am
Forum: C++ Development
Topic: Is it possible to have checkboxes appear for only certain nodes in wxTreeListCtrl?
Replies: 2
Views: 125

Re: Is it possible to have checkboxes appear for only certain nodes in wxTreeListCtrl?

No. If you don't need columns, you can a regular tree control and use the state image to emulate checkboxes. I wrote an example of doing that here.
by New Pagodi
Mon Jun 24, 2019 4:07 pm
Forum: C++ Development
Topic: Transparency PNG
Replies: 5
Views: 186

Re: Transparency PNG

New Pagodi, So it is best to modify the PNG and give it an appropriate background colour in order to make it cross-platform? Thank you. That will work if the background color of the panel never changes. The only solution that is guaranteed to work on all ports is to skip the button class altogether...
by New Pagodi
Sat Jun 22, 2019 4:15 am
Forum: C++ Development
Topic: Transparency PNG
Replies: 5
Views: 186

Re: Transparency PNG

When the "transparent" parts of an image are drawn, what really happens is that the background color of the window is drawn instead. ball thinks its background color is white so that's what gets drawn for the transparent parts of the image. You can try ball->SetBackgroundColour(wxColor(0,0,0)); to m...
by New Pagodi
Sat Jun 22, 2019 2:19 am
Forum: C++ Development
Topic: closing frame
Replies: 1
Views: 90

Re: closing frame

I'm pretty sure your program is crashing. According to the documentation for connect , you need to supply a data object and an event handler or NULL will be used by default. So Connect(ID_CNR,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(MyFrame::OnChoice1),NULL,this); and Connect(ID_CREATE,wxE...