Re: Rotate Gdk::Window
- From: codekiddy <codekiddy gmail com>
- To: Ian Martin <martin_id vodafone co nz>
- Cc: Gtkmm List <gtkmm-list gnome org>
- Subject: Re: Rotate Gdk::Window
- Date: Wed, 16 Dec 2015 00:33:04 +0100
hello Ian,
I'm implementing a roulette table, each number on the table is a custom made widget (derived from Gtk::Widget).
Top widget is a Gtk::Grid, The grid attaches child widgets, in the end there is a grid of 3 x 12 visible child widgets. (number fields),
I'm assuming you didn't player roulette...
when you place a chip on, let's say on.. half a number, the widget will draw one half of a chip, and its neighboring widget is signaled to draw the other half (so that entry chip is drawn on the table )
The widget who sends a signal also sends coordinates on where to draw. the child widgets are interconnected by signals to their neighboring widgets.
However the table, that is their parent(Gtk::Grid) might change from vertical to horizontal view of the table, in that case child widgets (numbers) and their neighboring widgets are reordered and do not have the same coordinate system any more, and x y points that were valid in vertical view will be wrong in that horizontal view because signal handlers of neighboring widgets are fixed to vertical table not horizontal.
This might be better illustrated by looking at following 2 images, (vertical numbers and horizontal numbers)
So I want to change the view of the table and preserve coordinate system of child widgets, otherwise I need to reconnect all child widget handlers to different signals so that chips get drawn correctly.
I would like to post a code but there is a lot of it.
It could be my design is bad, so any design recommendations specific for this case is welcome.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]