Search found 43 matches

by Gabriele Giuseppini
Fri Aug 07, 2020 10:21 pm
Forum: C++ Development
Topic: How to prevent SetCursor() on top-level frame from affecting another frame
Replies: 11
Views: 229

Re: How to prevent SetCursor() on top-level frame from affecting another frame

Alternatively you could also check if the mouse cursor is over the settings window.
That's a good one. Is there a "hit test" functionality I may use to figure out whether the mouse pointer is over a frame, or do I need to rely on MouseEnter/MouseLeave events also for that?
by Gabriele Giuseppini
Fri Aug 07, 2020 9:06 pm
Forum: C++ Development
Topic: How to prevent SetCursor() on top-level frame from affecting another frame
Replies: 11
Views: 229

Re: How to prevent SetCursor() on top-level frame from affecting another frame

Sure, let me try to explain it differently. The main "game" frame - which is either full screen or maximized - has "the hammer" as a cursor. The "settings window" frame - which is opened by the user on demand, is shown on top of the "game" frame, and is smaller than the "game" frame - doesn't have a...
by Gabriele Giuseppini
Fri Aug 07, 2020 4:52 pm
Forum: C++ Development
Topic: How to prevent SetCursor() on top-level frame from affecting another frame
Replies: 11
Views: 229

Re: How to prevent SetCursor() on top-level frame from affecting another frame

Unfortunately, it looks like the Activation event is not sent when the user moves the mouse pointer over a different window, it's only sent when the user actually clicks on a window. The issue I have is that the window that is underneath the mouse pointer is the one that dictates the mouse pointer -...
by Gabriele Giuseppini
Thu Aug 06, 2020 10:54 pm
Forum: C++ Development
Topic: How to prevent SetCursor() on top-level frame from affecting another frame
Replies: 11
Views: 229

Re: How to prevent SetCursor() on top-level frame from affecting another frame

That's fantastic, you never cease to learn new things about wxWidgets. Never heard of the Activate event before!

Thanks so much for the tip, trying it out immediately!
by Gabriele Giuseppini
Thu Aug 06, 2020 6:41 pm
Forum: C++ Development
Topic: How to prevent SetCursor() on top-level frame from affecting another frame
Replies: 11
Views: 229

Re: How to prevent SetCursor() on top-level frame from affecting another frame

The switch (actually a flickering, as it happens at each SetCursor invocation) only happens when the cursor is above the "settings window"; when the cursor is instead moved over the "game window" (which is full screen and larger than the "settings window") then only the "game window" cursor is shown...
by Gabriele Giuseppini
Thu Aug 06, 2020 4:47 pm
Forum: C++ Development
Topic: How to prevent SetCursor() on top-level frame from affecting another frame
Replies: 11
Views: 229

How to prevent SetCursor() on top-level frame from affecting another frame

Dear wx gurus, I've got a little problem with cursors and I need your expert guidance. My top level window is a wxFrame implementing "the game", and it has its own cursor (say, a "hammer"). During the game the user may open a "settings window", which is another wxFrame that stays on top of the "game...
by Gabriele Giuseppini
Sun Apr 05, 2020 1:36 pm
Forum: C++ Development
Topic: Seeking advice on application architecture for mutually exclusive top "UIs"
Replies: 8
Views: 365

Re: Seeking advice on application architecture for mutually exclusive top "UIs"

In that case I would like the game to stop, and the "Editor" UI to replace it seamlessly. Then when the editor is closed, the game may restart from zero. As a matter of fact I don't need to maintain state, thanks for helping me clarifying that out. At each switch, each of the UIs would "start from s...
by Gabriele Giuseppini
Sun Apr 05, 2020 11:24 am
Forum: C++ Development
Topic: Seeking advice on application architecture for mutually exclusive top "UIs"
Replies: 8
Views: 365

Re: Seeking advice on application architecture for mutually exclusive top "UIs"

I see, that makes sense, thank you. What about the MessageLoop? With that I mean, when the first panel ("Game") is shown, certain events will be bound to certain handlers (think mouse, accelerators, timers, etc.); with the switch to the second "UI" (the "Builder"), all handlers of the first UI shoul...
by Gabriele Giuseppini
Sat Apr 04, 2020 9:53 pm
Forum: C++ Development
Topic: Seeking advice on application architecture for mutually exclusive top "UIs"
Replies: 8
Views: 365

Re: Seeking advice on application architecture for mutually exclusive top "UIs"

I think I do understand the idea of the while loop - basically alternate between two "top" frames from the application's OnInit(). But then each frame would show its own title, icon, top bar, and so on; is there a way to have a single "parent", "empty" frame, only the content of which - including me...
by Gabriele Giuseppini
Sat Apr 04, 2020 10:04 am
Forum: C++ Development
Topic: Seeking advice on application architecture for mutually exclusive top "UIs"
Replies: 8
Views: 365

Seeking advice on application architecture for mutually exclusive top "UIs"

Dear wxWidgets gurus, Up until now my application (a simple game) has been a simple, "classic" single-frame app: class MainFrame (a wxFrame) owns UI controls, a menu bar, an OpenGL canvas, and the whole UI state machine. The single wxApp in my process creates an instance of this MainFrame in its OnI...
by Gabriele Giuseppini
Mon Dec 30, 2019 8:59 pm
Forum: C++ Development
Topic: Sliding Panel
Replies: 6
Views: 1512

Re: Sliding Panel

Does anyone have a suggestion on how to implement exactly what this user asked (10+ years ago!)? I'd like the exact look'n'feel of his example (thin border with arrow, etc.), except that the panel should slide vertically.
by Gabriele Giuseppini
Tue Oct 29, 2019 7:17 pm
Forum: C++ Development
Topic: Cannot get wxListCtrl to draw default border when not expanded
Replies: 9
Views: 627

Re: Cannot get wxListCtrl to draw default border when not expanded

Created ticket, https://trac.wxwidgets.org/ticket/18549.

Thank you all for your help. It seems I'll have to release with the simple border :roll:
by Gabriele Giuseppini
Tue Oct 29, 2019 2:40 pm
Forum: C++ Development
Topic: Cannot get wxListCtrl to draw default border when not expanded
Replies: 9
Views: 627

Re: Cannot get wxListCtrl to draw default border when not expanded

Took me a while, but I've been able to rebuild my sample with 3.1.3 - the behavior is the same: the wxListCtrl control has no default border.

Should I open a ticket do you think?