Search found 84 matches

by AndrzejB
Wed Dec 16, 2020 12:28 pm
Forum: C++ Development
Topic: Paint,events and threads
Replies: 1
Views: 111

Re: Paint,events and threads

(Partial?) solution: it works if I replace Refresh() by paintNow()
Only partial because I want extend it by timer:

Code: Select all

EVT_TIMER (wxID_ANY, wxxTerminal::OnTimerEvent)
paintNow() works but timer not. Timer should be in thread.

Solution: instead of timer-> thread with sleep(100)
by AndrzejB
Wed Dec 16, 2020 12:18 pm
Forum: C++ Development
Topic: Paint,events and threads
Replies: 1
Views: 111

Paint,events and threads

I have control wxxTerminal, If I press Enter and last line (commandline) is not empty, is sended event from control to user. wxCommandEvent event(wxEVT_COMMAND_ENTER, GetId()); event.SetString(commandLine); wxPostEvent(GetParent(), event); Event is pushed to queue (wxPostEvent) for asynchronous call...
by AndrzejB
Fri Dec 11, 2020 5:08 pm
Forum: C++ Development
Topic: How on keyPress enable national chars?
Replies: 1
Views: 128

How on keyPress enable national chars?

My component uses: EVT_KEY_DOWN(wxxTerminal::keyDown) EVT_KEY_UP(wxxTerminal::keyUp) EVT_CHAR(wxxTerminal::keyPress) I want: - no modifiers - print char - control - special in keyDown - left Alt - menu - right Alt - print national char, for Polish keyboard is A->Ą, c->ć etc it will be well to avoid ...
by AndrzejB
Fri Dec 11, 2020 10:49 am
Forum: C++ Development
Topic: How to send event from my component?
Replies: 3
Views: 190

Re: How to send event from my component?

It works when I change wxEVT_MY_CUSTOM_COMMAND to wxEVT_COMMAND_ENTER
both wxPostEvent(GetParent(), event); and wxPostEvent(this, event) works
by AndrzejB
Fri Dec 11, 2020 10:40 am
Forum: C++ Development
Topic: How to send event from my component?
Replies: 3
Views: 190

How to send event from my component?

to frame? Button has: void wxButton::Click() { wxCommandEvent event(wxEVT_BUTTON, GetId()); InitCommandEvent(event); Command(event); } But in my case not found InitCommandEvent and Command I defined // define a custom event type (we don't need a separate declaration here but // usually you would use...
by AndrzejB
Thu Dec 10, 2020 6:56 pm
Forum: C++ Development
Topic: How write terminal emnulator?
Replies: 4
Views: 235

Re: How write terminal emnulator?

Own components using wxWidgets should have name start with "wx" or other , for example "wxx"?
wxTerminal or wxxTerminal?
by AndrzejB
Thu Dec 10, 2020 9:40 am
Forum: C++ Development
Topic: How write terminal emnulator?
Replies: 4
Views: 235

Re: How write terminal emnulator?

I think, I should first write simple one-line editor. Text cursor is delivered by system or I must draw vertical line using timer? How to choose mono-spaced font Linux/Windows independent?
by AndrzejB
Thu Dec 10, 2020 6:34 am
Forum: C++ Development
Topic: How write terminal emnulator?
Replies: 4
Views: 235

How write terminal emnulator?

Features:
- mono-spaced font
- only last logical line editable
- non editable last line prompt
- logical line can be two or more physical lines
- resizing of dialog causes change logical line to one physical or more, depend of text length
by AndrzejB
Mon Sep 28, 2020 3:05 pm
Forum: C++ Development
Topic: How check menu item?
Replies: 1
Views: 191

Re: How check menu item?

Problem solved:
1. I must set style wxITEM_CHECK to menu item
2. call Check after appending to menu

But.. is possible change style of checkbox? Currently is white in green box, is possible , for example, black on white box?
by AndrzejB
Mon Sep 28, 2020 1:33 pm
Forum: C++ Development
Topic: How check menu item?
Replies: 1
Views: 191

How check menu item?

Problem seems to be easy. I have: wxMenuItem *open_project = new wxMenuItem(menuFile, wxID_OPEN_PROJECT, wxT("Open project"), "",wxITEM_CHECK ); open_project->SetCheckable(true); open_project->Check(true); or menuFile->Check(wxID_OPEN_PROJECT, true); is error: invalid menu item In wxWidgets sample i...
by AndrzejB
Mon Sep 28, 2020 8:03 am
Forum: C++ Development
Topic: Copy-paste from closed editor
Replies: 9
Views: 717

Re: Copy-paste from closed editor

I have cinnamon. Other applications have the same problem, including gedit and gitk.
by AndrzejB
Mon Sep 28, 2020 5:56 am
Forum: C++ Development
Topic: Copy-paste from closed editor
Replies: 9
Views: 717

Re: Copy-paste from closed editor

I compiled wxWidgets 3.1.4 with configure:
../configure --enable-sockets --with-gtk=3 --enable-unicode --enable-debug --disable-monolithic --disable-shared
on Linux Mint 20
by AndrzejB
Sat Sep 26, 2020 11:03 pm
Forum: C++ Development
Topic: How keep icons in executable?
Replies: 1
Views: 212

How keep icons in executable?

Is needed resource icons. I see example xrc, but there is folder with resources and icons are not linked to file.
Other solution: maybe is possible one big file with all application icons instead of many icon files ?
by AndrzejB
Sat Sep 26, 2020 1:20 pm
Forum: C++ Development
Topic: Copy-paste from closed editor
Replies: 9
Views: 717

Re: Copy-paste from closed editor

Before closing I have text "Text from wx clipboard sample at Sat Sep 26 15:16:34 2020" but after closing - no text. I think it is Linux behaviour Other applications like Gedit (previously I badly check it) also not copied clipboard after closing. Partially solution - editor will opened long time wit...
by AndrzejB
Sat Sep 26, 2020 6:12 am
Forum: C++ Development
Topic: Copy-paste from closed editor
Replies: 9
Views: 717

Re: Copy-paste from closed editor

I do : void MyFrame::OnCloseMain(wxCloseEvent& event) { if (CloseAll()) { wxTheClipboard->Flush(); Destroy(); } else event.Veto(); } But clipboard is cleared before destroy:, I must flush before delete notebook page. Is problem: clibboard is cleared in wxModule::DoCleanUpModules -> wxClipboardModule...