[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1513
Date : Mon Jul 24 18:32:26 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/stdbars.cpp
M /Trunk/XaraLX/wxOil/camelot.cpp
M /Trunk/XaraLX/wxOil/dlgevt.cpp
M /Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
M /Trunk/XaraLX/wxXtra/slidercombo.cpp
Make popup slider live
Diff:
Index: Trunk/XaraLX/Kernel/stdbars.cpp
===================================================================
--- Trunk/XaraLX/Kernel/stdbars.cpp (revision 1512)
+++ Trunk/XaraLX/Kernel/stdbars.cpp (revision 1513)
@@ -261,7 +261,7 @@
}
else
{
- if( DIM_SELECTION_CHANGED == DMsg->DlgMsg )
+ if (( DIM_SELECTION_CHANGED == DMsg->DlgMsg ) || ( DIM_SLIDER_POS_SET == DMsg->DlgMsg ))
{
TRACEUSER( "luke", _T("Change focus") );
AfxGetApp().GiveActiveCanvasFocus();
Index: Trunk/XaraLX/wxXtra/slidercombo.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/slidercombo.cpp (revision 1512)
+++ Trunk/XaraLX/wxXtra/slidercombo.cpp (revision 1513)
@@ -51,8 +51,8 @@
virtual wxString GetStringValue() const
{
- // FIXME: Does this get called in wxGTK? On wxMSW this gets called on popup close
- return wxString::Format(wxT("%d"), GetValue());
+ // FIXME: Does this get called in wxGTK? On wxMSW this gets called on popup close
+ return m_combo->GetValue();
}
protected:
Index: Trunk/XaraLX/wxOil/dlgevt.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgevt.cpp (revision 1512)
+++ Trunk/XaraLX/wxOil/dlgevt.cpp (revision 1513)
@@ -569,12 +569,16 @@
// Check if focus is going to an always focus object (may need more tests
// as more controls come online). If so just return allowing focus to stay
wxWindow* pWnd = (wxWindow*)event.GetEventObject();
+
+ TRACEUSER("amb", _T("DialogEventHandler::OnSetFocus %s"), pWnd->GetClassInfo()->GetClassName());
+
if( pWnd->IsKindOf( CLASSINFO(wxTextCtrl) ) ||
pWnd->IsKindOf( CLASSINFO(wxSliderCombo) ) ||
pWnd->IsKindOf( CLASSINFO(wxComboBox) ) ||
pWnd->IsKindOf( CLASSINFO(wxOwnerDrawnComboBox) ) ||
pWnd->IsKindOf( CLASSINFO(wxComboCtrl) ) )
{
+ TRACEUSER("amb", _T("DialogEventHandler::OnSetFocus Focus undisturbed 1"));
return;
}
@@ -586,7 +590,10 @@
if( pWnd->IsKindOf( CLASSINFO(wxDialog) ) )
{
if( ((wxDialog*)pWnd)->IsModal() )
+ {
+ TRACEUSER("amb", _T("Focus undisturbed 2"));
return;
+ }
// Non-modal dialog so do focus handling
break;
@@ -595,6 +602,7 @@
pWnd = pWnd->GetParent();
}
+ TRACEUSER("amb", _T("DialogEventHandler::OnSetFocus Focus back to canvas"));
// Put the focus back into active view
TRACEUSER( "jlh92", _T("NO, that control is not allowed focus") );
AfxGetApp().GiveActiveCanvasFocus();
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp (revision 1512)
+++ Trunk/XaraLX/wxOil/camelot.cpp (revision 1513)
@@ -254,10 +254,25 @@
SeeAlso: The focus handling document
**********************************************************************************************/
+
int /*TYPENOTE: Correct*/ CCamApp::FilterEvent( wxEvent& event )
{
static /*TYPENOTE: Correct*/ long lLastTimeStamp = 0;
+// useful code to see where focus events originate from. Set a breakpoint below and look
+// at the call stack
+#if 0 && defined(_DEBUG)
+ if ( event.GetEventType() == wxEVT_SET_FOCUS )
+ {
+ wxObject* pEventObject = event.GetEventObject();
+ TRACEUSER("amb", _T("CCamApp::FilterEvent focus to %s"), pEventObject->GetClassInfo()->GetClassName());
+ if (pEventObject->IsKindOf(CLASSINFO(CRenderWnd)))
+ {
+ int i=1;
+ }
+ }
+#endif
+
if (( event.GetEventType() == wxEVT_CREATE )
&& (event.GetEventObject()->IsKindOf(CLASSINFO(wxTopLevelWindow)))
&& !(event.GetEventObject()->IsKindOf(CLASSINFO(wxAdvSplashScreen))) // Don't trigger this on the creation of the splash screen itself
@@ -314,6 +329,7 @@
TRACEUSER( "jlh92", _T("----------------------
") );
}
#endif
+ TRACEUSER("amb", _T("CCamApp::FilterEvent key for %s"), pClassInfo->GetClassName());
if( pClassInfo->IsKindOf( CLASSINFO(wxTextCtrl) ) ||
pClassInfo->IsKindOf( CLASSINFO(wxComboBox) ) ||
@@ -322,6 +338,7 @@
pClassInfo->IsKindOf( CLASSINFO(wxComboCtrl) )
)
{
+ TRACEUSER("amb", _T("CCamApp::FilterEvent gets keys as special"));
TRACEUSER( "jlh92", _T("Control gets keys") );
// Yes, pass on as usual
return -1;
@@ -342,6 +359,7 @@
if( ((wxDialog*)pWnd)->IsModal() )
{
TRACEUSER( "jlh92", _T("Modal dialog
") );
+ TRACEUSER("amb", _T("CCamApp::FilterEvent gets keys as modal"));
return -1;
}
@@ -352,6 +370,7 @@
pWnd = pWnd->GetParent();
}
+ TRACEUSER("amb", _T("CCamApp::FilterEvent handle"));
TRACEUSER( "jlh92", _T("Handled!
") );
// Process keyboard messages (and mark event as handled)
Index: Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc (revision 1512)
+++ Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc (revision 1513)
@@ -1069,9 +1069,14 @@
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>0</border>
- <object class="wxSlider" name="IDC_FEATHERSIZE_CUSTOMEDIT">
- <size>60,-1</size>
- <style>wxSL_HORIZONTAL|wxSL_AUTOTICKS</style>
+ <object class="wxSliderCombo" name="IDC_FEATHERSIZE_CUSTOMEDIT">
+ <size>64,-1</size>
+ <font>
+ <size>8</size>
+ </font>
+ <style>wxTE_PROCESS_ENTER</style>
+ <buttonsize>17,-1</buttonsize>
+ <sliderstyle>wxSL_HORIZONTAL|wxSL_AUTOTICKS</sliderstyle>
<value>0</value>
<min>0</min>
<max>100</max>
Xara