Search found 342 matches

by New Pagodi
Tue Nov 26, 2019 8:05 am
Forum: C++ Development
Topic: How to convert a codepoint to utf8
Replies: 3
Views: 231

Re: How to convert a codepoint to utf8

You can convert a unicode code point to a wxUniChar . Usually unicode code points are listed in hexadecimal. To take your example, decimal 61 is 0x41 in hexadecimal, and you can look up that the unicode code point is U+0041 listed as "LATIN CAPITAL LETTER A" . You can create this a wxUniChar for thi...
by New Pagodi
Sat Nov 23, 2019 10:47 pm
Forum: C++ Development
Topic: Bug with wxStyledTextCtrl::GetCurrentPois in wxEVT_STC_UPDATEUI
Replies: 3
Views: 644

Re: Bug with wxStyledTextCtrl::GetCurrentPois in wxEVT_STC_UPDATEUI

This sounds like this issue. It was recently fixed. If you can, try using the latest version from git. If that's not an option, try using CallAfter as discussed in the first comment on that ticket.

If your issue still happens with the latest version from git, open a new ticket.
by New Pagodi
Sun Nov 17, 2019 5:02 am
Forum: C++ Development
Topic: wxStyledTextCtrl for HTML + CSS + JS
Replies: 3
Views: 249

Re: wxStyledTextCtrl for HTML + CSS + JS

Sorry, no lexer currently supports this. There was a recent discussion on the Scintilla list about this very question.
by New Pagodi
Thu Nov 14, 2019 11:55 pm
Forum: Platform Related Issues
Topic: mediactrl.Load always gives False
Replies: 16
Views: 1025

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: 1025

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: 383

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: 1085

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: 451

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: 451

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: 225

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: 451

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: 204

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: 499

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: 499

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: 194

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.