1. I need help with Win32lib's remove and add style
- Posted by Judith Evans <camping at arkansas.net> Apr 11, 2005
- 439 views
I've been investigating a rewrite of IDE in an attempt to simplify the code. I decided to createEx Property, ProjectView and ToolBox as windows with WS_CHILD. This makes a lot of the mumbo jumbo of IDE much easier when moving and resizing these windows. I thought I could remove the WS_CHILD style when undocking but it appears that style doesn't work with removeStyle. Below is what I have done. Have I got it wrong or is there something else I should use? If I can not remove the child style then these windows are stuck inside the MainWindow client area and that has not traditionally been how IDE works. >--property now to be undocked > addStyle(PropertySheet, { > (WS_THICKFRAME+WS_CAPTION+WS_MINIMIZEBOX+WS_SYSMENU+WS_BORDER+ > WS_DLGFRAME+WS_MAXIMIZEBOX),(0)}) > > removeStyle(PropertySheet,{(WS_CHILD),(0)}) Thanks, judith evans
2. Re: I need help with Win32lib's remove and add style
- Posted by Judith Evans <camping at arkansas.net> Apr 12, 2005
- 432 views
Judith Evans wrote: > > I've been investigating a rewrite of IDE in an attempt to simplify the code. > > I decided to createEx Property, ProjectView and ToolBox as windows with > WS_CHILD. This > makes a lot of the mumbo jumbo of IDE much easier when moving and resizing > these windows. > I thought I could remove the WS_CHILD style when undocking but it appears that > style > doesn't > work with removeStyle. Below is what I have done. Have I got it wrong or is > there something > else I should use? If I can not remove the child style then these windows are > stuck > inside > the MainWindow client area and that has not traditionally been how IDE works. > > >--property now to be undocked > > addStyle(PropertySheet, { > > (WS_THICKFRAME+WS_CAPTION+WS_MINIMIZEBOX+WS_SYSMENU+WS_BORDER+ > > WS_DLGFRAME+WS_MAXIMIZEBOX),(0)}) > > > > removeStyle(PropertySheet,{(WS_CHILD),(0)}) > > Thanks, > judith evans > Since there is no reply to this question, I suppost that means this can not be done. So my next question is how much of a problem is it for IDE users if undocked windows must stay in the Main Window client area? ~judith evans
3. Re: I need help with Win32lib's remove and add style
- Posted by Alexander Toresson <alexander.toresson at gmail.com> Apr 12, 2005
- 413 views
Judith Evans wrote: > > Judith Evans wrote: > > > > I've been investigating a rewrite of IDE in an attempt to simplify the code. > > > > I decided to createEx Property, ProjectView and ToolBox as windows with > > WS_CHILD. This > > makes a lot of the mumbo jumbo of IDE much easier when moving and resizing > > these windows. > > I thought I could remove the WS_CHILD style when undocking but it appears > > that style > > doesn't > > work with removeStyle. Below is what I have done. Have I got it wrong or is > > there something > > else I should use? If I can not remove the child style then these windows > > are stuck > > inside > > the MainWindow client area and that has not traditionally been how IDE > > works. > > > > >--property now to be undocked > > > addStyle(PropertySheet, { > > > (WS_THICKFRAME+WS_CAPTION+WS_MINIMIZEBOX+WS_SYSMENU+WS_BORDER+ > > > WS_DLGFRAME+WS_MAXIMIZEBOX),(0)}) > > > > > > removeStyle(PropertySheet,{(WS_CHILD),(0)}) > > > > Thanks, > > judith evans > > > > Since there is no reply to this question, I suppost that means this can not be > done. > So my next question is how much of a problem is it for IDE users if undocked > windows > must stay in the Main Window client area? > ~judith evans I was hesitating to replying to your original post, because I expected someone with more knowledge about win32 api to reply to it. But that doesn't seem to have been the case. AFAIK some properties can not be removed or added after the creation of the object. Maybe an option would be to re-create the window when docking/undocking? I'm not a user of your ide, so I can't answer the last question. I'm on linux now, when I was on windows I preferred to interface directly with win32lib, so I haven't used it much. I think I've just started it once. Regards, Alexander Toresson
4. Re: I need help with Win32lib's remove and add style
- Posted by Judith Evans <camping at arkansas.net> Apr 12, 2005
- 437 views
Alexander Toresson wrote: > > Judith Evans wrote: > > > > Judith Evans wrote: > > > > > > I've been investigating a rewrite of IDE in an attempt to simplify the > > > code. > > > > > > I decided to createEx Property, ProjectView and ToolBox as windows with > > > WS_CHILD. This > > > makes a lot of the mumbo jumbo of IDE much easier when moving and resizing > > > these windows. > > > I thought I could remove the WS_CHILD style when undocking but it appears > > > that style > > > doesn't > > > work with removeStyle. Below is what I have done. Have I got it wrong or > > > is there something > > > else I should use? If I can not remove the child style then these windows > > > are stuck > > > inside > > > the MainWindow client area and that has not traditionally been how IDE > > > works. > > > > > > >--property now to be undocked > > > > addStyle(PropertySheet, { > > > > (WS_THICKFRAME+WS_CAPTION+WS_MINIMIZEBOX+WS_SYSMENU+WS_BORDER+ > > > > WS_DLGFRAME+WS_MAXIMIZEBOX),(0)}) > > > > > > > > removeStyle(PropertySheet,{(WS_CHILD),(0)}) > > > > > > Thanks, > > > judith evans > > > > > > > Since there is no reply to this question, I suppost that means this can not > > be done. > > So my next question is how much of a problem is it for IDE users if undocked > > windows > > must stay in the Main Window client area? > > ~judith evans > > I was hesitating to replying to your original post, because I expected someone > with > more knowledge about win32 api to reply to it. But that doesn't seem to have > been the > case. > > AFAIK some properties can not be removed or added after the creation of the > object. > Maybe an option would be to re-create the window when docking/undocking? > > I'm not a user of your ide, so I can't answer the last question. I'm on linux > now, > when I was on windows I preferred to interface directly with win32lib, > so I haven't used it much. I think I've just started it once. > > Regards, Alexander Toresson > I thought about destroying and recreating but somewhere in my memory bank is a warning from Derek not to do a lot of that in a program. In an older IDE I created the support windows when user clicked a menuitem requesting that window and then deleting it when user closed the window. I think that caused some problems which Derek was responding to... Anyone know another trick? ~judith evans
5. Re: I need help with Win32lib's remove and add style
- Posted by Greg Haberek <ghaberek at gmail.com> Apr 12, 2005
- 441 views
> Since there is no reply to this question, I suppost that means this can not be > done. So my next question is how much of a problem is it for IDE users if > undocked windows must stay in the Main Window client area? > ~judith evans Couldn't you create two separate windows? or would that be too much? I don't mind the windows staying inside IDE. ~Greg
6. Re: I need help with Win32lib's remove and add style
- Posted by Al Getz <Xaxo at aol.com> Apr 12, 2005
- 433 views
Hi Judith, I didnt understand your question entirely but perhaps if nothing else you could create a dummy window and stick all the orphans under that parent by using 'SetParent()'. Appologies if this isnt anything you wanted Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
7. Re: I need help with Win32lib's remove and add style
- Posted by Michael Bolin <lucretius_2 at yahoo.com> Apr 12, 2005
- 428 views
Greg Haberek wrote: > > > Since there is no reply to this question, I suppost that means this can not > > be done. So my next > question is how much of a problem is it for IDE users if undocked windows must > stay in the Main Window client area?</font></i> > > ~judith evans > > Couldn't you create two separate windows? or would that be too much? I > don't mind the windows staying inside IDE. > > ~Greg Having two windows would be greatly facilitated by making sure their IDs are variables instead of constants; that way you could swap them to allow the same code to access them (I think). Also, all of their OnClick() etc. events could use the same code. But maybe I'm missing something that would make it too difficult. BTW, I applied Sascha's fixes to win32lib and it seems to be working fine at least for now. I just started studying the IDE code to familiarize myself with it. I'm interested in helping with the development (unless you're making enough code changes that it would be confusing right now). Let me know if you're interested. Michael Bolin
8. Re: I need help with Win32lib's remove and add style
- Posted by Mario Steele <eumario at trilake.net> Apr 12, 2005
- 434 views
Judith Evans wrote: <snip> > Since there is no reply to this question, I suppost that means this can not be > done. > So my next question is how much of a problem is it for IDE users if undocked > windows > must stay in the Main Window client area? > ~judith evans Okay, sorry about not responding to ya sooner, but I was in the midst of working with SOOP, and getting migrated over to Linux. Don't worry though, I haven't completely given up on Windows. :P To much of a market out there to be rid of it completely. In any case, the solution to your problem, would be to, for example, create the Property Box, as 1 window. Then through intuitive usage of the Afore mentioned SetParent() function refrenced by our very own Al Getz, we can dyanmically set the Parent of the Property Box between the Externally created window, for usage of "Un-Docking" the window, and the Main IDE Window, which will have it. Here's a little sniplet of code, to help you on your way:
constant xSetParent = definew32Function(user32,"SetParent",{C_LONG,C_LONG},C_INT) -- Since I don't know if Derek has it declared in user32.ew constant MainPropertyBox = createEx(Window,"Property Box",IDEWin,0,0,32,32,{WS_CHILD}), -- Add any extra flags in there you want. UnDockedPropertyBox = createEx(Window,"Property Box",0,0,0,0,0,{WS_POPUP,WS_DLGFRAME}), -- This will be the window to display the Property Box when the User Undocks it. integer UnDocked UnDocked = 0 -- It starts off in the IDEWin procedure onClick_UndockProperty(integer id, integer event, sequence param) if UnDocked then void = w32Func(xSetParent,{getHandle(MainPropertyBox),getHandle(IDEWin)}) UnDocked = 0 else void = w32Func(xSetParent,{getHandle(MainPropertyBox),getHandle(UnDockedPropertyBox)}) UnDocked = 1 end if end procedure setHandler(UnDockPropertyBox,w32HClick,routine_id("onClick_UndockProperty"))
This is a rough set of code, that's not garunteed to work from the get go, might need a little fenagling to make it work, but the basic principal is the same. It's how most other programs do the Dock/Undock stuff for their GUI. I do hope this helps Judith, cause I know how many long hours you've put in on this thing, and even though I'm on the Enemy System (Atleast to Windows I am), I'm not gonna be much help in testing. Should you ever need code still though to make things work, let me know. I still have my Win32lib API Refrence in my head, it's not gonna dis-appear anytime soon. Mario Steele http://enchantedblade.trilake.net Attaining World Dominiation, one byte at a time...
9. Re: I need help with Win32lib's remove and add style
- Posted by Judith Evans <camping at arkansas.net> Apr 12, 2005
- 424 views
Thanks to everyone who helped me out with this problem. I very much appreciate your responding to my plea for help. (Hanging my head in shame) it was so simple a solution! ~judith evans
10. Re: I need help with Win32lib's remove and add style
- Posted by Judith Evans <camping at arkansas.net> Apr 12, 2005
- 433 views
Michael Bolin wrote: >> > > > Couldn't you create two separate windows? or would that be too much? I > > don't mind the windows staying inside IDE. > > > > ~Greg > > Having two windows would be greatly facilitated by making sure their IDs are > variables > instead > of constants; that way you could swap them to allow the same code to access > them (I > think). > Also, all of their OnClick() etc. events could use the same code. But maybe > I'm missing > something that would make it too difficult. > > BTW, I applied Sascha's fixes to win32lib and it seems to be working fine at > least > for now. > > I just started studying the IDE code to familiarize myself with it. The code is in frightful shape and a bit of an embarrassment. Keep in mind that I started work on this project in 1999 after using Euphoria and win32lib for about 6 months and have learned a lot and win32lib has matured even more so there is a lot of unnecessary/complicated code. I will start redoing most of IDE very soon. I already have a rough demo as proof of concept using the child window approach and that has eliminated a lot of my speghetti code. Also there are a lot of statements that can be moved to routines to simplify code. >I'm interested > in helping with > the development (unless you're making enough code changes that it would be > confusing > right > now). Let me know if you're interested. I'm always interested in help! I'll contact you via private e-mail and discuss this further. > > Michael Bolin Thanks! ~judith evans