Search found 322 matches

by alys666
Mon Aug 30, 2021 6:50 pm
Forum: C++ Development
Topic: Using crash reporting code from dbugrprt samples crashes
Replies: 12
Views: 851

Re: Using crash reporting code from dbugrprt samples crashes

just skip them. it's my functions to dump stack to console, and getting a dir path to put crash log file in there. ensure_dir(..) creates this if, it not exists. tdump(...) - writes a string to terminal. look at wxWIdgets functions only. ps. to simulate crash, just run this code ///imitates hard err...
by alys666
Mon Aug 30, 2021 5:46 pm
Forum: C++ Development
Topic: Using crash reporting code from dbugrprt samples crashes
Replies: 12
Views: 851

Re: Using crash reporting code from dbugrprt samples crashes

this code is working in linux. i just copied from my app - it catches exceptions, shows crash dialog and copies crash data to a file. class IdeApplication : public wxApp { IdeFrame *_frame = nullptr; public: ///IDE app ctor IdeApplication() { ///handle fatal exceptions of the app ///kinda installs c...
by alys666
Mon Aug 30, 2021 11:43 am
Forum: C++ Development
Topic: wrong wxAuiManager perspective while pane is dragged
Replies: 1
Views: 522

Re: wrong wxAuiManager perspective while pane is dragged

this function works. if not all panes are docked - it returns false. ///can manager be closed and perspective saved? bool canPerspectiveBeSaved(wxAuiManager &fman) { wxAuiPaneInfoArray lpanes = fman.GetAllPanes(); for (int i=0; i<lpanes.Count(); ++i){ if (lpanes[i].IsFloating()) return false; } retu...
by alys666
Mon Aug 30, 2021 10:23 am
Forum: C++ Development
Topic: wrong wxAuiManager perspective while pane is dragged
Replies: 1
Views: 522

wrong wxAuiManager perspective while pane is dragged

The problem. If Im dragging a window from one place to another in wxAuiManager, and has not placed it properly, and close a program - wxAuiManager::savePerspective() gives inconvenient result, and future perspective load hides this window and it cannot be properly restored(because it was not placed)...
by alys666
Thu Nov 12, 2020 9:45 am
Forum: C++ Development
Topic: Prevent app from mice contact bounce
Replies: 1
Views: 223

Prevent app from mice contact bounce

Hi! When I m opening a wxMenu, sometimes i see an effect of mice contact bounce, when menu immediately closes after opening or selects a menu element, and i want to protect my app from this effect. It looks like menu event handler has some unwanted events at start(because of mice bounce) and its que...
by alys666
Fri Feb 21, 2020 5:11 pm
Forum: wxWidgets Development (Russian)
Topic: wxThread и её текущая директория
Replies: 7
Views: 5429

Re: wxThread и её текущая директория

а ты программно драйвер пускаешь, через wxExec какой-нибудь? тогда можно также программно менять текущую диру через wxSetWorkingDirectory. меняешь рабочую диру и пускаешь внешнее приложение. тогда оно запустится с этой новой рабочей. типа auto lold= wxGetCwd(); if( wxSetWorkingDirectory("folder\need...
by alys666
Fri Feb 21, 2020 1:08 pm
Forum: wxWidgets Development (Russian)
Topic: wxThread и её текущая директория
Replies: 7
Views: 5429

Re: wxThread и её текущая директория

ну если текущая папка из потока правильная, то значит дело не в папке.
текущая дира это атрибут процесса, то есть запущенного приложения, и поток как часть приложения, будет ее иметь такой же как и само приложение.
by alys666
Sun Feb 16, 2020 10:46 am
Forum: C++ Development
Topic: processing of custom events
Replies: 27
Views: 3866

Re: processing of custom events

who can explain - why to use wxCommandEvent, instead of regular wxThreadEvent, for inter-thread communication?
thanks.
by alys666
Thu Jan 30, 2020 10:08 pm
Forum: C++ Development
Topic: calculate screen pos -> pos on rotated wxBitmap
Replies: 2
Views: 562

Re: calculate screen pos -> pos on rotated wxBitmap

p3 will point in the original image. transformation matrix A transforms coordinates from Space to Space'; when inverted matrix A' transforms coordinates from Space' to Space; so if you have matrix wxAffineMatrix2D mat; then wxAffineMatrix2D matInversed = mat; matInversed.Inverse(); will be a backwa...
by alys666
Fri Jan 24, 2020 10:44 am
Forum: C++ Development
Topic: Showing images from a video stream
Replies: 93
Views: 13681

Re: Showing images from a video stream

I wanted to draw current FPS and I noticed that "gc->SetFont(GetFont(), *wxWHITE);" adds another 20 ms :shock: i never rendered graphics with wxWidgets... but function virtual void wxGraphicsContext::SetFont(const wxGraphicsFont &font); looks closer to hardware, so must be more fast, you just have ...
by alys666
Tue Jan 21, 2020 8:30 am
Forum: C++ Development
Topic: Aui how to change size of a docked pane
Replies: 5
Views: 652

Re: Aui how to change size of a docked pane

I'v made a bottom docked pane for diagnostic messages to a user. And I want it showed up for 1 sec. and then minimized it's height. But I cant change its size what ever I tried. Thank you if i remember, for wxAuiManager, to hide/show docked pane, you just need to call(surprise!) pane.Show(), pane.H...
by alys666
Mon Jan 13, 2020 9:27 pm
Forum: C++ Development
Topic: Calculate the space needed
Replies: 4
Views: 543

Re: Calculate the space needed

read about wxFont and search around <wxFONTFAMILY_TELETYPE>
by alys666
Mon Jan 13, 2020 7:26 am
Forum: C++ Development
Topic: The thread does not want to finish because of the “TestDestroy” always return false.
Replies: 10
Views: 1283

Re: The thread does not want to finish because of the “TestDestroy” always return false.

Thank you for your response. Unfortunately, I have seen that documentation link before and still don't understand it well. If you answer my following questions you will facilitate me to understand some things that I don't understand. After I call wxThread::Delete from outside a runtime error occurr...
by alys666
Mon Jan 13, 2020 7:19 am
Forum: C++ Development
Topic: The thread does not want to finish because of the “TestDestroy” always return false.
Replies: 10
Views: 1283

Re: The thread does not want to finish because of the “TestDestroy” always return false.

if you want just test how the thread works, do your diagnostics via printf(...), or std::cout<<"text".
as doubleMax said you cannot use visual objects of wxWidgets from secondary threads, you can only send messsges of wxThreadMessage class to main frame(or any window of wxWidgets).
by alys666
Sat Jan 11, 2020 12:35 pm
Forum: C++ Development
Topic: wxwidgets flex bison
Replies: 10
Views: 1655

Re: wxwidgets flex bison

the easiest way here -
console app writes to std::cout.
see wxProcess class and wxExecute functions, and how to read output of a secondary app started from wxWIdgets app.
so - you develop wxWIdgets app, which starts your "bison app", reads its console output and analyses it as needed.