rubasurex
08-02-2009 09:08:37
I've been setting up a TabControl for my editor and have found what appears to be some bugs. I may just be doing something wrong, but I'll list them anyway just in case.
1. Calling resetToDefault() in TabPageDesc does not appear to reset the underlying textDesc. Each time I create a new tab (reusing the TabPageDesc), it uses the text of the previous tab and then appends the text for the new tab. To work around this, I have to also call resetToDefault() on the underlying textDesc. I haven't had to do this with any other control.
2. Clicking on a tab in the tab control does not appear to handle the mouse down event, but instead allows the event to pass through to my editor, which causes the scene underneath to be modified. I believe this is being caused because there are no user-defined mouse down events for the tab, so the injectMouseButtonDown method returns false. The mouse up event is handled however as this selects the tab.
3. addWidgetEventHandler for TabPage appears to do nothing. I tried to add a mouse up and mouse down event and mWidgetEventHandlers is empty after the calls.
4. Clicking anywhere on a tab page allows the input to pass through, which causes a problem as it interacts with the scene below the tab page. I think that any mouse up/down events over a tab page should be discarded by QuickGUI and the injectMouseButtonDown and injectMouseButtonUp methods should return true.
I think that any mouse down/up events over a solid control (i.e. button, tab page, window, etc...) should always be "handled" by QuickGUI even if it does nothing. Otherwise you end up with mouse events interacting with your scene underneath the widgets. I just tried a window widget and it also allows input to pass through it. If I click anywhere in the window, or a try resizing it, or moving it, my editor modifies the scene underneath it.
The only exception to this that I can think of is transparent container controls such as sheets and widgets that have no input interaction such as labels and the tab control (except for the actual tabs themselves of course).
On a side note, I have a couple of questions.
1. Is it possible to create separators in a menu? You know how if you go to the File menu in Visual Studio for example, you can see the horizontal separators between logical groups of menu items.
2. I would like to use icons (i.e. small 32x32 images) on buttons and tabs in the tab control rather than text. Is this possible? Is there somewhere to set an image to be used on a button or a tab?
3. What is the correct way to remove a texture from a widget. For example, I want a tab control that has no visible presence (i.e. no texture). I just want to see the tab pages. I have gone into the TabControl skintypes file and set the Texture property to nothing. That seem to do the trick, but I just wanted to make sure that is the "correct" way to do it.
4. Is there a way to control the width of tabs? I find that they are very narrow (i.e. only as wide as the text in them). At the moment I'm just adding extra white space padding to make the tabs wider.
5. Is there a slider control? I couldn't find one, but I just thought I'd ask.
1. Calling resetToDefault() in TabPageDesc does not appear to reset the underlying textDesc. Each time I create a new tab (reusing the TabPageDesc), it uses the text of the previous tab and then appends the text for the new tab. To work around this, I have to also call resetToDefault() on the underlying textDesc. I haven't had to do this with any other control.
2. Clicking on a tab in the tab control does not appear to handle the mouse down event, but instead allows the event to pass through to my editor, which causes the scene underneath to be modified. I believe this is being caused because there are no user-defined mouse down events for the tab, so the injectMouseButtonDown method returns false. The mouse up event is handled however as this selects the tab.
3. addWidgetEventHandler for TabPage appears to do nothing. I tried to add a mouse up and mouse down event and mWidgetEventHandlers is empty after the calls.
4. Clicking anywhere on a tab page allows the input to pass through, which causes a problem as it interacts with the scene below the tab page. I think that any mouse up/down events over a tab page should be discarded by QuickGUI and the injectMouseButtonDown and injectMouseButtonUp methods should return true.
I think that any mouse down/up events over a solid control (i.e. button, tab page, window, etc...) should always be "handled" by QuickGUI even if it does nothing. Otherwise you end up with mouse events interacting with your scene underneath the widgets. I just tried a window widget and it also allows input to pass through it. If I click anywhere in the window, or a try resizing it, or moving it, my editor modifies the scene underneath it.
The only exception to this that I can think of is transparent container controls such as sheets and widgets that have no input interaction such as labels and the tab control (except for the actual tabs themselves of course).
On a side note, I have a couple of questions.
1. Is it possible to create separators in a menu? You know how if you go to the File menu in Visual Studio for example, you can see the horizontal separators between logical groups of menu items.
2. I would like to use icons (i.e. small 32x32 images) on buttons and tabs in the tab control rather than text. Is this possible? Is there somewhere to set an image to be used on a button or a tab?
3. What is the correct way to remove a texture from a widget. For example, I want a tab control that has no visible presence (i.e. no texture). I just want to see the tab pages. I have gone into the TabControl skintypes file and set the Texture property to nothing. That seem to do the trick, but I just wanted to make sure that is the "correct" way to do it.
4. Is there a way to control the width of tabs? I find that they are very narrow (i.e. only as wide as the text in them). At the moment I'm just adding extra white space padding to make the tabs wider.
5. Is there a slider control? I couldn't find one, but I just thought I'd ask.