Permalink
Browse files

SCNumberBox2 -> SCNumberBox

SCNumberBox -> SCNumberBoxOld

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9900 a380766d-ff14-0410-b294-a243070f3f08
  • Loading branch information...
Scott Wilson
Scott Wilson committed Feb 28, 2010
1 parent 5e127a4 commit e3deff0c2ab94432c800abf59970e90e58394486
@@ -186,11 +186,11 @@ class SCTextField : public SCView
SCColor mStringColor;
};
-class SCNumberBox2 : public SCTextField
+class SCNumberBox : public SCTextField
{
public:
- SCNumberBox2(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
- virtual ~SCNumberBox2();
+ SCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
+ virtual ~SCNumberBox();
virtual int setProperty(PyrSymbol *symbol, PyrSlot *slot);
virtual int getProperty(PyrSymbol *symbol, PyrSlot *slot);
virtual void keyDown(int character, int modifiers, unsigned short keycode);
@@ -855,11 +855,11 @@ class SCStaticText : public SCView
};
SCView* NewSCStaticText(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
-class SCNumberBox : public SCStaticText
+class SCNumberBoxOld : public SCStaticText
{
public:
- SCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
- virtual ~SCNumberBox();
+ SCNumberBoxOld(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
+ virtual ~SCNumberBoxOld();
virtual void draw(SCRect inDamage);
virtual bool shouldDim();
@@ -873,7 +873,7 @@ class SCNumberBox : public SCStaticText
virtual bool canReceiveDrag();
virtual void receiveDrag();
};
-SCView* NewSCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
+SCView* NewSCNumberBoxOld(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
class SCDragSource : public SCStaticText
{
@@ -2627,23 +2627,23 @@ void SCTextField::beginDrag(SCPoint where)
}
////////////////////
-SCView* NewSCNumberBox2(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
+SCView* NewSCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
{
- return new SCNumberBox2(inParent, inObj, inBounds);
+ return new SCNumberBox(inParent, inObj, inBounds);
}
-SCNumberBox2::SCNumberBox2(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
+SCNumberBox::SCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
: SCTextField(inParent, inObj, inBounds)
//: SCStaticText(inParent, inObj, inBounds)
{
[mTextField addNumberFormatter];
}
-SCNumberBox2::~SCNumberBox2()
+SCNumberBox::~SCNumberBox()
{
}
-int SCNumberBox2::setProperty(PyrSymbol *symbol, PyrSlot *slot)
+int SCNumberBox::setProperty(PyrSymbol *symbol, PyrSlot *slot)
{
int err;
char *name = symbol->name;
@@ -2675,7 +2675,7 @@ int SCNumberBox2::setProperty(PyrSymbol *symbol, PyrSlot *slot)
return SCTextField::setProperty(symbol, slot);
}
-int SCNumberBox2::getProperty(PyrSymbol *symbol, PyrSlot *slot)
+int SCNumberBox::getProperty(PyrSymbol *symbol, PyrSlot *slot)
{
char *name = symbol->name;
@@ -2688,7 +2688,7 @@ int SCNumberBox2::getProperty(PyrSymbol *symbol, PyrSlot *slot)
return SCTextField::getProperty(symbol, slot);
}
-void SCNumberBox2::keyDown(int character, int modifiers, unsigned short keycode)
+void SCNumberBox::keyDown(int character, int modifiers, unsigned short keycode)
{
// test for arrows enter and return
if([mTextField editingInactive] && (character == 63232 || character == 63233 || character == 63234 || character == 63235 || character == 3 || character == 13)){
View
@@ -6302,29 +6302,29 @@ void SCEnvelopeView::receiveDrag()
////////////////////////////////////////////////
-SCView* NewSCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
+SCView* NewSCNumberBoxOld(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
{
- return new SCNumberBox(inParent, inObj, inBounds);
+ return new SCNumberBoxOld(inParent, inObj, inBounds);
}
-SCNumberBox::SCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
+SCNumberBoxOld::SCNumberBoxOld(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds)
: SCStaticText(inParent, inObj, inBounds)
{
mBackground = new SolidColorBackground(SCMakeColor(1.0,1.0,1.0, 1.0)); // default is white
mEnabled = true;
mCanFocus = true;
}
-SCNumberBox::~SCNumberBox()
+SCNumberBoxOld::~SCNumberBoxOld()
{
}
-bool SCNumberBox::shouldDim()
+bool SCNumberBoxOld::shouldDim()
{
return true;
}
-void SCNumberBox::draw(SCRect inDamage)
+void SCNumberBoxOld::draw(SCRect inDamage)
{
SCView::draw(inDamage);
SCRect bounds = getDrawBounds();
@@ -6345,7 +6345,7 @@ void SCNumberBox::draw(SCRect inDamage)
drawString(sbounds);
}
-//int SCNumberBox::setProperty(PyrSymbol *symbol, PyrSlot *slot)
+//int SCNumberBoxOld::setProperty(PyrSymbol *symbol, PyrSlot *slot)
//{
// int err;
// char *name = symbol->name;
@@ -6358,14 +6358,14 @@ void SCNumberBox::draw(SCRect inDamage)
// return SCStaticText::setProperty(symbol, slot);
//}
-void SCNumberBox::mouseTrack(SCPoint where, int modifiers, NSEvent *theEvent)
+void SCNumberBoxOld::mouseTrack(SCPoint where, int modifiers, NSEvent *theEvent)
{
if (modifiers & NSCommandKeyMask) {
beginDrag(where);
}
}
-//int SCNumberBox::getProperty(PyrSymbol *symbol, PyrSlot *slot)
+//int SCNumberBoxOld::getProperty(PyrSymbol *symbol, PyrSlot *slot)
//{
// char *name = symbol->name;
// if (strcmp(name, "boxColor")==0) {
@@ -6374,14 +6374,14 @@ void SCNumberBox::mouseTrack(SCPoint where, int modifiers, NSEvent *theEvent)
// return SCStaticText::getProperty(symbol, slot);
//}
-bool SCNumberBox::canReceiveDrag()
+bool SCNumberBoxOld::canReceiveDrag()
{
PyrSlot result;
sendMessage(s_canReceiveDrag, 0, 0, &result);
return IsTrue(&result);
}
-void SCNumberBox::receiveDrag()
+void SCNumberBoxOld::receiveDrag()
{
sendMessage(s_receiveDrag, 0, 0, 0);
}
@@ -6646,7 +6646,7 @@ extern SCView* NewSCCocoaTextView(SCContainerView *inParent, PyrObject* inObj, S
extern SCView* NewSCMovieView(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
extern SCView* NewSCQuartzComposerView(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
extern SCView* NewSCTextField(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
-extern SCView* NewSCNumberBox2(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
+extern SCView* NewSCNumberBox(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
extern SCView* NewSCLevelIndicator(SCContainerView *inParent, PyrObject* inObj, SCRect inBounds);
void registerSCViewClasses()
@@ -6664,7 +6664,7 @@ void registerSCViewClasses()
new SCViewMaker("SC2DTabletSlider", NewSC2DTabletSlider);
new SCViewMaker("SCButton", NewSCButton);
new SCViewMaker("SCStaticText", NewSCStaticText);
- new SCViewMaker("SCNumberBox", NewSCNumberBox);
+ new SCViewMaker("SCNumberBoxOld", NewSCNumberBoxOld);
new SCViewMaker("SCDragSource", NewSCDragSource);
new SCViewMaker("SCDragSink", NewSCDragSink);
new SCViewMaker("SCDragBoth", NewSCDragBoth);
@@ -6681,7 +6681,7 @@ void registerSCViewClasses()
new SCViewMaker("SCMovieView", NewSCMovieView);
new SCViewMaker("SCQuartzComposerView", NewSCQuartzComposerView);
new SCViewMaker("SCTextField", NewSCTextField);
- new SCViewMaker("SCNumberBox2", NewSCNumberBox2);
+ new SCViewMaker("SCNumberBox", NewSCNumberBox);
new SCViewMaker("SCScrollTopView", NewSCScrollTopView);
new SCViewMaker("SCScrollView", NewSCScrollView);
new SCViewMaker("SCLevelIndicator", NewSCLevelIndicator);
@@ -98,7 +98,7 @@ SCTextField : SCStaticTextBase {
}
-SCNumberBox2 : SCTextField {
+SCNumberBox : SCTextField {
//var <> keyString,
var <>step=1, <>scroll_step=1;
@@ -1074,7 +1074,7 @@ SCStaticText : SCStaticTextBase {
}
-SCNumberBox : SCStaticTextBase {
+SCNumberBoxOld : SCStaticTextBase {
var <> keyString, <>step=1, <>scroll_step=1;
var <>typingColor, <>normalColor;
var <>clipLo = -inf, <>clipHi = inf, hit, inc=1.0, <>scroll=true;
@@ -1,8 +1,8 @@
-SCTextFieldOld : SCNumberBox {
+SCTextFieldOld : SCNumberBoxOld {
- *viewClass { ^SCNumberBox }
+ *viewClass { ^SCNumberBoxOld }
defaultKeyDownAction { arg key, modifiers, unicode;
if(unicode == 0,{ ^this });

0 comments on commit e3deff0

Please sign in to comment.