diff --git a/bazaar/CMeter/CMeter.cpp b/bazaar/CMeter/CMeter.cpp index cec4e7809..96797dddb 100644 --- a/bazaar/CMeter/CMeter.cpp +++ b/bazaar/CMeter/CMeter.cpp @@ -402,10 +402,6 @@ void CMeter::PaintCVMarks(Painter & sw) if(cvmarks.GetCount()<=0) return; Size size = GetSize(); Vector p; - if(cvmarks.GetCount() > 2) - { - int a = 0; - } if(vertical) { sw.DrawRect(0,0,px,size.cy,style->backcol); diff --git a/bazaar/Dispatcher/Dispatcher.h b/bazaar/Dispatcher/Dispatcher.h index 5d42b5f01..51e2fd12c 100644 --- a/bazaar/Dispatcher/Dispatcher.h +++ b/bazaar/Dispatcher/Dispatcher.h @@ -21,7 +21,7 @@ public: virtual ~Dispatchable(); public: - virtual void Dispatch(const T & o, unsigned param = 0) = 0; + virtual void Dispatch(const T & o) = 0; void Unregister(const Any & _src); void UnregisterAll(); @@ -43,7 +43,7 @@ public: Dispatcher(); virtual ~Dispatcher(); - void DoDispatch(const T & o, unsigned param = 0) const; + void DoDispatch(const T & o) const; void Register(Dispatchable & d, unsigned key = 0); void Unregister(Dispatchable & d, unsigned key = 0); @@ -63,7 +63,7 @@ public: virtual ~DispatcherGen(); template - void DoDispatch(const T & o, unsigned param = 0) const; + void DoDispatch(const T & o) const; template void Register(Dispatchable & d, unsigned key = 0); @@ -88,15 +88,15 @@ public: DispatcherCB(); virtual ~DispatcherCB(); - void DoDispatch(const T & o, unsigned param = 0) const; + void DoDispatch(const T & o) const; - void Register(Callback2 d, unsigned key); + void Register(Callback1 d, unsigned key); void Unregister(unsigned key); - Callback2 GetDispatchable(unsigned key); - const VectorMap > & GetDests() const { return dests; } + Callback1 GetDispatchable(unsigned key); + const VectorMap > & GetDests() const { return dests; } private: - VectorMap > dests; + VectorMap > dests; }; //a generic version that accepts any Callback @@ -108,10 +108,10 @@ public: virtual ~DispatcherCBGen(); template - void DoDispatch(const T & o, unsigned param = 0) const; + void DoDispatch(const T & o) const; template - void Register(Callback2 d, unsigned key); + void Register(Callback1 d, unsigned key); template void Unregister(unsigned key); template diff --git a/bazaar/Dispatcher/Dispatcher.hpp b/bazaar/Dispatcher/Dispatcher.hpp index 896b379fb..86d520c96 100644 --- a/bazaar/Dispatcher/Dispatcher.hpp +++ b/bazaar/Dispatcher/Dispatcher.hpp @@ -50,12 +50,12 @@ Dispatcher::~Dispatcher() } template -void Dispatcher::DoDispatch(const T & o, unsigned param) const +void Dispatcher::DoDispatch(const T & o) const { for(int i = 0; i < dests.GetCount(); i++) { Dispatchable * dest = dests.operator[](i); - dest->Dispatch(o, param); + dest->Dispatch(o); } } @@ -92,14 +92,14 @@ Dispatchable * Dispatcher::GetDispatchable(unsigned key) const } template -void DispatcherGen::DoDispatch(const T & o, unsigned param) const +void DispatcherGen::DoDispatch(const T & o) const { for(int i = 0; i < dests.GetCount(); i++) { const Any & a = dests.operator[](i); if(!a.Is >()) continue; const Dispatcher & dest = a.Get >(); - dest.DoDispatch(o, param); + dest.DoDispatch(o); return; } } @@ -161,17 +161,17 @@ DispatcherCB::~DispatcherCB() } template -void DispatcherCB::DoDispatch(const T & o, unsigned param) const +void DispatcherCB::DoDispatch(const T & o) const { for(int i = 0; i < dests.GetCount(); i++) { - const Callback2 & dest = dests.operator[](i); - dest(o, param); + const Callback1 & dest = dests.operator[](i); + dest(o); } } template -void DispatcherCB::Register(Callback2 d, unsigned key) +void DispatcherCB::Register(Callback1 d, unsigned key) { int i = dests.Find(key); if(i>=0) return; @@ -187,29 +187,29 @@ void DispatcherCB::Unregister(unsigned key) } template -Callback2 DispatcherCB::GetDispatchable(unsigned key) +Callback1 DispatcherCB::GetDispatchable(unsigned key) { int i = dests.Find(key); if(i<0) return; - Callback2 & dest = dests.operator[](i); + Callback1 & dest = dests.operator[](i); return dest; } template -void DispatcherCBGen::DoDispatch(const T & o, unsigned param) const +void DispatcherCBGen::DoDispatch(const T & o) const { for(int i = 0; i < dests.GetCount(); i++) { const Any & a = dests.operator[](i); if(!a.Is >()) continue; const DispatcherCB & dest = a.Get >(); - dest.DoDispatch(o, param); + dest.DoDispatch(o); return; } } template -void DispatcherCBGen::Register(Callback2 d, unsigned key) +void DispatcherCBGen::Register(Callback1 d, unsigned key) { for(int i = 0; i < dests.GetCount(); i++) { diff --git a/bazaar/DispatcherTest/DispatcherTest.h b/bazaar/DispatcherTest/DispatcherTest.h index 81c0a8ca9..7bf7bb5af 100644 --- a/bazaar/DispatcherTest/DispatcherTest.h +++ b/bazaar/DispatcherTest/DispatcherTest.h @@ -18,7 +18,7 @@ public: typedef MyPane CLASSNAME; MyPane(); - virtual void Dispatch(const Value & o, unsigned param); + virtual void Dispatch(const Value & o); }; class DispatcherTest : public WithDispatcherTestLayout diff --git a/bazaar/DispatcherTest/main.cpp b/bazaar/DispatcherTest/main.cpp index b2bbae04c..42b7da211 100644 --- a/bazaar/DispatcherTest/main.cpp +++ b/bazaar/DispatcherTest/main.cpp @@ -10,7 +10,7 @@ MyPane::MyPane() dl.Add(i); } -void MyPane::Dispatch(const Value & o, unsigned param) +void MyPane::Dispatch(const Value & o) { ei.SetData(o); //pi.SetData(o); @@ -24,7 +24,7 @@ void MyPane::Dispatch(const Value & o, unsigned param) void DispatcherTest::sliderCB() { Value o = sl.GetData(); - disp.DoDispatch(o, 123); + disp.DoDispatch(o); } DispatcherTest::DispatcherTest() diff --git a/bazaar/DispatcherTest2/DispatcherTest.h b/bazaar/DispatcherTest2/DispatcherTest.h index 14fbec7ca..5cda4ec50 100644 --- a/bazaar/DispatcherTest2/DispatcherTest.h +++ b/bazaar/DispatcherTest2/DispatcherTest.h @@ -19,8 +19,8 @@ public: typedef MyPane CLASSNAME; MyPane(); - virtual void Dispatch(const Value & o, unsigned param); - virtual void Dispatch(const int & o, unsigned param); + virtual void Dispatch(const Value & o); + virtual void Dispatch(const int & o); }; class DispatcherTest : public WithDispatcherTestLayout diff --git a/bazaar/DispatcherTest2/main.cpp b/bazaar/DispatcherTest2/main.cpp index bcec0df8f..7b9230a75 100644 --- a/bazaar/DispatcherTest2/main.cpp +++ b/bazaar/DispatcherTest2/main.cpp @@ -10,7 +10,7 @@ MyPane::MyPane() dl.Add(i); } -void MyPane::Dispatch(const Value & o, unsigned param) +void MyPane::Dispatch(const Value & o) { ei.SetData(o); //pi.SetData(o); @@ -19,7 +19,7 @@ void MyPane::Dispatch(const Value & o, unsigned param) st.SetText(String().Cat() << o); } -void MyPane::Dispatch(const int & o, unsigned param) +void MyPane::Dispatch(const int & o) { ei.SetData(o); //pi.SetData(o); @@ -33,13 +33,13 @@ void MyPane::Dispatch(const int & o, unsigned param) void DispatcherTest::sliderCB() { Value o = sl.GetData(); - disp.DoDispatch(o, 123); + disp.DoDispatch(o); } void DispatcherTest::slideriCB() { int o = sli.GetData(); - dispi.DoDispatch(o, 125); + dispi.DoDispatch(o); } DispatcherTest::DispatcherTest() diff --git a/bazaar/DispatcherTest3/DispatcherTest.h b/bazaar/DispatcherTest3/DispatcherTest.h index 98d3cec37..1675043d1 100644 --- a/bazaar/DispatcherTest3/DispatcherTest.h +++ b/bazaar/DispatcherTest3/DispatcherTest.h @@ -19,7 +19,7 @@ class WithDispatch public: typedef WithDispatch CLASSNAME; - virtual void Dispatch(const T & o, unsigned param) + virtual void Dispatch(const T & o) { C::SetData(o); } @@ -34,7 +34,7 @@ class ProgressIndicatorWithDispatch public: typedef ProgressIndicatorWithDispatch CLASSNAME; - virtual void Dispatch(const T & o, unsigned param) + virtual void Dispatch(const T & o) { Set(o); } diff --git a/bazaar/DispatcherTest3/main.cpp b/bazaar/DispatcherTest3/main.cpp index 0984bfb49..f2f64a85e 100644 --- a/bazaar/DispatcherTest3/main.cpp +++ b/bazaar/DispatcherTest3/main.cpp @@ -3,14 +3,14 @@ void DispatcherTest::sliderCB() { Value o = sl.GetData(); - disp.DoDispatch(o, 123); + disp.DoDispatch(o); } /* void DispatcherTest::slideriCB() { int o = sli.GetData(); - dispi.DoDispatch(o, 125); + dispi.DoDispatch(o); } */ diff --git a/bazaar/DispatcherTest4/DispatcherTest.h b/bazaar/DispatcherTest4/DispatcherTest.h index e382111a9..5a3a2b755 100644 --- a/bazaar/DispatcherTest4/DispatcherTest.h +++ b/bazaar/DispatcherTest4/DispatcherTest.h @@ -18,11 +18,11 @@ class MyEditInt public: typedef MyEditInt CLASSNAME; - virtual void Dispatch(const Value & o, unsigned param) + virtual void Dispatch(const Value & o) { SetData(o); } - virtual void Dispatch(const int & o, unsigned param) + virtual void Dispatch(const int & o) { SetData(o); } @@ -36,11 +36,11 @@ class MyProgressIndicator public: typedef MyProgressIndicator CLASSNAME; - virtual void Dispatch(const Value & o, unsigned param) + virtual void Dispatch(const Value & o) { Set(o); } - virtual void Dispatch(const int & o, unsigned param) + virtual void Dispatch(const int & o) { Set(o); } diff --git a/bazaar/DispatcherTest4/main.cpp b/bazaar/DispatcherTest4/main.cpp index 39cd5f8c5..67756e41e 100644 --- a/bazaar/DispatcherTest4/main.cpp +++ b/bazaar/DispatcherTest4/main.cpp @@ -3,13 +3,13 @@ void DispatcherTest::sliderCB() { Value o = sl.GetData(); - disp.DoDispatch(o, 123); + disp.DoDispatch(o); } void DispatcherTest::slideriCB() { int o = sli.GetData(); - dispi.DoDispatch(o, 125); + dispi.DoDispatch(o); } diff --git a/bazaar/DispatcherTest5/DispatcherTest.h b/bazaar/DispatcherTest5/DispatcherTest.h index 9fefc2cc3..efba71b65 100644 --- a/bazaar/DispatcherTest5/DispatcherTest.h +++ b/bazaar/DispatcherTest5/DispatcherTest.h @@ -18,11 +18,11 @@ class MyEditInt public: typedef MyEditInt CLASSNAME; - virtual void Dispatch(const Value & o, unsigned param) + virtual void Dispatch(const Value & o) { SetData(o); } - virtual void Dispatch(const int & o, unsigned param) + virtual void Dispatch(const int & o) { SetData(o); } @@ -36,11 +36,11 @@ class MyProgressIndicator public: typedef MyProgressIndicator CLASSNAME; - virtual void Dispatch(const Value & o, unsigned param) + virtual void Dispatch(const Value & o) { Set(o); } - virtual void Dispatch(const int & o, unsigned param) + virtual void Dispatch(const int & o) { Set(o); } diff --git a/bazaar/DispatcherTest5/main.cpp b/bazaar/DispatcherTest5/main.cpp index c4df3d466..5b480f974 100644 --- a/bazaar/DispatcherTest5/main.cpp +++ b/bazaar/DispatcherTest5/main.cpp @@ -3,13 +3,13 @@ void DispatcherTest::sliderCB() { Value o = sl.GetData(); - disp.DoDispatch(o, 123); + disp.DoDispatch(o); } void DispatcherTest::slideriCB() { int o = sli.GetData(); - disp.DoDispatch(o, 125); + disp.DoDispatch(o); } diff --git a/bazaar/DispatcherTest6/DispatcherTest.h b/bazaar/DispatcherTest6/DispatcherTest.h index a4818cc58..4b1814e49 100644 --- a/bazaar/DispatcherTest6/DispatcherTest.h +++ b/bazaar/DispatcherTest6/DispatcherTest.h @@ -16,11 +16,11 @@ class MyEditInt public: typedef MyEditInt CLASSNAME; - virtual void DispatchV(const Value & o, unsigned param) + virtual void DispatchV(const Value & o) { SetData(o); } - virtual void DispatchI(const int & o, unsigned param) + virtual void DispatchI(const int & o) { SetData(o); } @@ -32,11 +32,11 @@ class MyProgressIndicator public: typedef MyProgressIndicator CLASSNAME; - virtual void DispatchV(const Value & o, unsigned param) + virtual void DispatchV(const Value & o) { Set(o); } - virtual void DispatchI(const int & o, unsigned param) + virtual void DispatchI(const int & o) { Set(o); } @@ -51,7 +51,7 @@ public: void sliderCB(); void slideriCB(); - virtual void Dispatch(const Value & o, unsigned param); + virtual void Dispatch(const Value & o); DispatcherCBGen disp; diff --git a/bazaar/DispatcherTest6/main.cpp b/bazaar/DispatcherTest6/main.cpp index 676bbc79a..3ff2c3401 100644 --- a/bazaar/DispatcherTest6/main.cpp +++ b/bazaar/DispatcherTest6/main.cpp @@ -3,16 +3,16 @@ void DispatcherTest::sliderCB() { Value o = sl.GetData(); - disp.DoDispatch(o, 123); + disp.DoDispatch(o); } void DispatcherTest::slideriCB() { int o = sli.GetData(); - disp.DoDispatch(o, 125); + disp.DoDispatch(o); } -void DispatcherTest::Dispatch(const Value & o, unsigned param) +void DispatcherTest::Dispatch(const Value & o) { int a = 0; }