Form rotate lazarus / 31-LCL ---------------------------------------------------------------------- peshte · 2016-01-14 21:53 Hi. I need to rotate a form to 180 deg. On windows, I understand that it's not possible. I've seen, some time ago, on Madriva, that a form can be rotated with the mouse. I don't remember what desktop interface it was used that version of Mandriva. So, is there any possibility to rotate a form on a linux distribution and give commands to the desktop interface to rotate my form? On KDE, is a widget called "Folder view" that can be rotated. Thank you. ---------------------------------------------------------------------- User137 · 2016-01-15 11:31 Many things are possible with Linux http://i.stack.imgur.com/z7cet.png But if they are only used by handful of people, are you sure you want to focus software efforts for them? On Windows there might be commands that rotate the whole monitor. ---------------------------------------------------------------------- JuhaManninen · 2016-01-15 11:49 The feature you refer to is KDE's desktop widget. Yes, they can be rotated. It is not specific to Linux, it is specific to one desktop environment, namely KDE. To use it with Lazarus you would need to create C bindings library for the KDE C++ library, about like QT bindings are done now. That means it is possible but difficult. LCL is a cross-platform library and does not support such platform specific additions. It would be possible to create a cross-platform API for it and use it for environments that support it, but I doubt it is very high in anybody's priority list. I think the easiest way to use KDE API is Python. KDE project maintains Python bindings. ---------------------------------------------------------------------- peshte · 2016-01-15 14:52 Hi. Thank you for reply. I must do something like that: http://www.gesturetek.com/images/newscenter_new/images/Illuminate- Screen/table-cellphone-store.jpg So, because there are two persons face to face, one of them must see the forms he/she opens upside-down. It doesn't matter what OS will I use, because most of miniapplications will be in flash or HTML5. Lazarus supports platform specific commands. Like "ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_HIDE);" to hide the system tray. This command works on windows only. For KDE, i suppose that I must use some similar command. I suppose that, on KDE, is there such a command to rotate a form. I will study the QT bindings and I will reply here the results. Thank you. ---------------------------------------------------------------------- JuhaManninen · 2016-01-15 15:30 Quote from: peshte on January 15, 2016, 03:52:27 pmI must do something like that: http://www.gesturetek.com/images/newscenter_new/images/Illuminate- Screen/table-cellphone-store.jpg So, because there are two persons face to face, one of them must see the forms he/she opens upside-down. It doesn't matter what OS will I use, because most of miniapplications will be in flash or HTML5. Lazarus supports platform specific commands. Like "ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_HIDE);" to hide the system tray. This command works on windows only. For KDE, i suppose that I must use some similar command. I suppose that, on KDE, is there such a command to rotate a form. I will study the QT bindings and I will reply here the results. You confuse me now. Do you want to make a browser app using flash or HTML5, or do you want to call KDE API? They are 2 very different things. Pascal bindings for Windows API and other C libraries is easy because FPC can use it directly. Object oriented languages do not have any similar de-facto-standard binary interface. Thus the C++ classes and methods must be flattened into C library first. Yes, it is clumsy but practically all language bindings are done that way. KDE binding is a good idea. If you really want to make it, you should co-operate with Zeljko, mm7 and taazz who are discussing about QT5 bindings. See:  http://forum.lazarus.freepascal.org/index.php/topic,30977.0.html You may also want to subscribe to lazarus-qt mailing list. There is no traffic now, but if the bindings are implemented by many people, it should be coordinated there. ---------------------------------------------------------------------- peshte · 2016-01-15 15:43 QuoteYou confuse me now. Do you want to make a browser app using flash or HTML5, or do you want to call KDE API? They are 2 very different things.The form rotate is just one feature that can not be done unless it is in its own form. The rest parts of application will be HTML5 and flash. In css3 I can easily rotate anything, but I need to rotate a form that is not part from HTML5. I will study the links you provided. Thank you. ---------------------------------------------------------------------- balazsszekely · 2016-01-15 17:08 Quote@peshte In css3 I can easily rotate anything, but I need to rotate a form that is not part from HTML5.Then you don't need to rotate the form. Set the following:    1. FormStyle    --> fsSystemStayOnTop    2. Position       --> poScreenCenter    3. BorderStyle --> bsNone    3. On form create:           Form1.Width := Screen.Width;          Form1.Height := Screen.Height;    Now you got a full screen, borderless form that is on top of everything. Drop the webcontrol to the form, set align to alClient. Now you can manipulate the orientation from css3. ---------------------------------------------------------------------- peshte · 2016-01-15 17:39 I've already done that  Now, in the webcontrol, is a html/image/whatever button which must open a website. Like Google or Facebook or Youtube or something. With javascript+HTML5, this can be done in a popup or a javascript form (jquery-ui, so iframe). The popup can not be rotated at 180deg, but the javascript form yes. The problem is that the some websites does not allow their content to be loaded in an iframe. Some yes, but some no. Google, Facebook and Youtube doens't. I've studied the problem, and I can not trick the restricted website to load in iframe. I use cef3 for browser. So, when I press the html/image/link/whatever button, I transmit back to the main form to open a new window+browser with the desired website and rotated to the person who launched the command. The form rotate I can not do, yet. ---------------------------------------------------------------------- balazsszekely · 2016-01-15 18:30 @peshte So basically you cannot rotate everything from HTML/CSS.    Unfortunately I don't think there is an easy solution to your problem. Some video driver support screen rotation, but again this is not a generic solution. Maybe you should take a screenshot then rotate the bitmap. Which is your primary OS? ---------------------------------------------------------------------- peshte · 2016-01-15 19:14 The video driver is not a problem. The computer under the touchscreen table is powerful enough. I didn't choose the OS yet. It depends by the solution found. A screenshot is out of the question, because there must be active links, videos, and everything you found in Google, Facebook, Youtube, etc. I study the QT bindings. If am looking for a function like "findwindow('my form idenfitier').sendmessage('rotate','180deg')", or something like commands to windows api to do things. I am thinking to disable the free surfing the internet from the table, and let only some websites that I can load in iframe (like restaurant website, some touristic information websites, etc). ---------------------------------------------------------------------- balazsszekely · 2016-01-15 19:42 QuoteThe video driver is not a problem. The computer under the touchscreen table is powerful enough.Please try(under windows): Shif+Alt+Down then Shift+Alt+Up. I have an ATI Radeon adapter, which support this feature. QuoteA screenshot is out of the question, because there must be active links, videos, and everything you found in Google, Facebook, Youtube, etc.It's not impossible, I will try to make a demo tomorrow.