Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » DHCtrl changes for SDLCtrl
DHCtrl changes for SDLCtrl [message #28919] Mon, 27 September 2010 06:26 Go to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Mirek and Massimo

I wanted you include these changes or similar in DHCtrl. They are necessary for SDLCtrl (and MediaPlayer).

The main reason is that SDL does not accept a window handler, so the changes enclosed let DHCtrl to accept an external handler.

Summary of changes:

In CtrlCore.h
- class DHCtrl (Windows version)
void CloseHWND() and HWND hwnd moved from private to protected.

- class DHCtrl (X11 version)
virtual void State(int reason) and bool isInitialized moved from private to protected.
Window hwnd added in protected.

In X11DHCtrl.cpp
- Included this
	if (!hwnd) {
		hwnd = XCreateWindow(...unchanged...);
	} else {
		XReparentWindow(Xdisplay, hwnd, GetParentWindow(), r.left, r.top);
		XMoveResizeWindow(Xdisplay, hwnd, r.left, r.top, r.Width(), r.Height());
	}


- Window handle name changed from WindowHandle to hwnd.

The DHCtrl window reparent is only a must in uppsrc in X11. In windows as it is done in virtual State() and Layout() functions it can be done in user code.
  • Attachment: CtrlCore.7z
    (Size: 14.44KB, Downloaded 212 times)


Best regards
Iñaki
Re: DHCtrl changes for SDLCtrl [message #29047 is a reply to message #28919] Sun, 03 October 2010 17:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Commited, thanks.

Mirek
Re: DHCtrl changes for SDLCtrl [message #29058 is a reply to message #29047] Sun, 03 October 2010 21:27 Go to previous message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Thank you Mirek

I think actual implementation is not the best, but it is ok for now.

If anybody is trying to derive a class from DHCtrl for Irrlicht, Ogre, ..., I could help Smile.


Best regards
Iñaki
Previous Topic: is there way to call a procedure when the focus is lost?
Next Topic: GLCtrl questions
Goto Forum:
  


Current Time: Thu Apr 18 17:42:41 CEST 2024

Total time taken to generate the page: 0.02196 seconds