Native window styles on a GTK window



Hi! My first post on the list, apologies if it's inappropriately aimed.

I'm writing a cross-platform GTK application, using the Pike GTK2
module, and am wanting to put a real scroll bar on the window. This
requires setting a lower-level flag (on Windows, that's WS_VSCROLL in
the window style; presumably it's similar on other platforms but I
haven't checked). Is there a way to do this?

The reason I want to do this is because WS_VSCROLL enables ThinkPad
scrolling, which is a feature I would very much like to support. I
could have some conditional code that checks for the availability of
native scrolling, and falls back on ScrolledWindow, but so far I've
not seen any way to achieve this as such.

The nearest I've found is window_foreign_new from GDK, not GTK; that
would let me create a window in some other way, and then "hand it
over" to the toolkit. This seems hackish.

I'm really looking for either:
1) A way to set native window styles and hook native messages, or
2) A "NativelyScrolledWindow" class (or attribute of GTK2.Window) that
wraps it all up and falls back on creating a normal ScrollBar if it
can't do it natively on this platform.

I'm not sure which would be the less hackish... neither option is
really very good.

Hoping for tips!

Thanks!

Chris Angelico


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]