#include <TopLoc_Location.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <TColStd_HArray1OfTransient.hxx>
-#include <TColStd_SequenceOfAsciiString.hxx>
+#include <TColStd_HSequenceOfAsciiString.hxx>
#include <OSD_Timer.hxx>
#include <Geom_Axis2Placement.hxx>
#include <Geom_Axis1Placement.hxx>
{
TCollection_AsciiString aCommandName (theArgv[0]);
- NCollection_DataMap<TCollection_AsciiString, TColStd_SequenceOfAsciiString> aMapOfArgs;
+ NCollection_DataMap<TCollection_AsciiString, Handle(TColStd_HSequenceOfAsciiString)> aMapOfArgs;
if (aCommandName == "vtexture")
{
if (theArgsNb < 2)
aParseKey = anArg;
aParseKey.Remove (1);
aParseKey.UpperCase();
- aMapOfArgs.Bind (aParseKey, TColStd_SequenceOfAsciiString());
+ aMapOfArgs.Bind (aParseKey, new TColStd_HSequenceOfAsciiString);
continue;
}
continue;
}
- aMapOfArgs.ChangeFind (aParseKey).Append (anArg);
+ aMapOfArgs(aParseKey)->Append (anArg);
}
}
else if (aCommandName == "vtexscale"
return 1;
}
- TColStd_SequenceOfAsciiString anArgs;
+ Handle(TColStd_HSequenceOfAsciiString) anArgs = new TColStd_HSequenceOfAsciiString;
if (theArgsNb == 2)
{
- anArgs.Append ("OFF");
+ anArgs->Append ("OFF");
}
else if (theArgsNb == 4)
{
- anArgs.Append (TCollection_AsciiString (theArgv[2]));
- anArgs.Append (TCollection_AsciiString (theArgv[3]));
+ anArgs->Append (TCollection_AsciiString (theArgv[2]));
+ anArgs->Append (TCollection_AsciiString (theArgv[3]));
}
TCollection_AsciiString anArgKey;
{
// scan for parameters of vtexdefault command
// equal to -default option of vtexture command
- aMapOfArgs.Bind ("DEFAULT", TColStd_SequenceOfAsciiString());
+ aMapOfArgs.Bind ("DEFAULT", new TColStd_HSequenceOfAsciiString);
}
// Check arguments for validity
- NCollection_DataMap<TCollection_AsciiString, TColStd_SequenceOfAsciiString>::Iterator aMapIt (aMapOfArgs);
+ NCollection_DataMap<TCollection_AsciiString, Handle(TColStd_HSequenceOfAsciiString)>::Iterator aMapIt (aMapOfArgs);
for (; aMapIt.More(); aMapIt.Next())
{
const TCollection_AsciiString& aKey = aMapIt.Key();
- const TColStd_SequenceOfAsciiString& anArgs = aMapIt.Value();
+ const Handle(TColStd_HSequenceOfAsciiString)& anArgs = aMapIt.Value();
// -scale, -origin, -repeat: one argument "off", or two real values
if ((aKey.IsEqual ("SCALE") || aKey.IsEqual ("ORIGIN") || aKey.IsEqual ("REPEAT"))
- && ((anArgs.Length() == 1 && anArgs (1) == "OFF")
- || (anArgs.Length() == 2 && anArgs (1).IsRealValue() && anArgs (2).IsRealValue())))
+ && ((anArgs->Length() == 1 && anArgs->Value(1) == "OFF")
+ || (anArgs->Length() == 2 && anArgs->Value(1).IsRealValue() && anArgs->Value(2).IsRealValue())))
{
continue;
}
// -modulate: single argument "on" / "off"
- if (aKey.IsEqual ("MODULATE") && anArgs.Length() == 1 && (anArgs (1) == "OFF" || anArgs (1) == "ON"))
+ if (aKey.IsEqual ("MODULATE") && anArgs->Length() == 1 && (anArgs->Value(1) == "OFF" || anArgs->Value(1) == "ON"))
{
continue;
}
// -default: no arguments
- if (aKey.IsEqual ("DEFAULT") && anArgs.IsEmpty())
+ if (aKey.IsEqual ("DEFAULT") && anArgs->IsEmpty())
{
continue;
}
// Process other options and commands
// ------------------------------------
- TColStd_SequenceOfAsciiString aValues;
+ Handle(TColStd_HSequenceOfAsciiString) aValues;
if (aMapOfArgs.Find ("DEFAULT", aValues))
{
aTexturedIO->SetTextureRepeat (Standard_False);
{
if (aMapOfArgs.Find ("SCALE", aValues))
{
- if (aValues (1) != "OFF")
+ if (aValues->Value(1) != "OFF")
{
- aTexturedIO->SetTextureScale (Standard_True, aValues (1).RealValue(), aValues (2).RealValue());
+ aTexturedIO->SetTextureScale (Standard_True, aValues->Value(1).RealValue(), aValues->Value(2).RealValue());
}
else
{
if (aMapOfArgs.Find ("ORIGIN", aValues))
{
- if (aValues (1) != "OFF")
+ if (aValues->Value(1) != "OFF")
{
- aTexturedIO->SetTextureOrigin (Standard_True, aValues (1).RealValue(), aValues (2).RealValue());
+ aTexturedIO->SetTextureOrigin (Standard_True, aValues->Value(1).RealValue(), aValues->Value(2).RealValue());
}
else
{
if (aMapOfArgs.Find ("REPEAT", aValues))
{
- if (aValues (1) != "OFF")
+ if (aValues->Value(1) != "OFF")
{
- aTexturedIO->SetTextureRepeat (Standard_True, aValues (1).RealValue(), aValues (2).RealValue());
+ aTexturedIO->SetTextureRepeat (Standard_True, aValues->Value(1).RealValue(), aValues->Value(2).RealValue());
}
else
{
if (aMapOfArgs.Find ("MODULATE", aValues))
{
- if (aValues (1) == "ON")
+ if (aValues->Value(1) == "ON")
{
aTexturedIO->EnableTextureModulate();
}
#include <Image_AlienPixMap.hxx>
#include <OpenGl_GraphicDriver.hxx>
#include <OSD_Timer.hxx>
-#include <TColStd_SequenceOfAsciiString.hxx>
+#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TColStd_SequenceOfInteger.hxx>
#include <TColStd_HSequenceOfReal.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
//purpose : Zoom
//==============================================================================
+#if defined(_WIN32) || ! defined(__APPLE__) || defined(MACOSX_USE_GLX)
static void ProcessControlButton1Motion()
{
ViewerTest::CurrentView()->Zoom( X_ButtonPress, Y_ButtonPress, X_Motion, Y_Motion);
X_ButtonPress = X_Motion;
Y_ButtonPress = Y_Motion;
}
+#endif
//==============================================================================
//function : VT_ProcessControlButton2Motion
// Parse options and values
// -------------------------
- NCollection_DataMap<TCollection_AsciiString, TColStd_SequenceOfAsciiString> aMapOfKeysByValues;
+ NCollection_DataMap<TCollection_AsciiString, Handle(TColStd_HSequenceOfAsciiString)> aMapOfKeysByValues;
TCollection_AsciiString aParseKey;
for (Standard_Integer anArgIt = 1; anArgIt < theArgsNb; ++anArgIt)
{
aParseKey = anArg;
aParseKey.Remove (1);
aParseKey.UpperCase();
- aMapOfKeysByValues.Bind (aParseKey, TColStd_SequenceOfAsciiString());
+ aMapOfKeysByValues.Bind (aParseKey, new TColStd_HSequenceOfAsciiString);
continue;
}
return 1;
}
- aMapOfKeysByValues.ChangeFind (aParseKey).Append (anArg);
+ aMapOfKeysByValues(aParseKey)->Append (anArg);
}
// ---------------------------------------------
// ---------------------------------------------
// Check arguments for validity
- NCollection_DataMap<TCollection_AsciiString, TColStd_SequenceOfAsciiString>::Iterator aMapIt (aMapOfKeysByValues);
+ NCollection_DataMap<TCollection_AsciiString, Handle(TColStd_HSequenceOfAsciiString)>::Iterator aMapIt (aMapOfKeysByValues);
for (; aMapIt.More(); aMapIt.Next())
{
const TCollection_AsciiString& aKey = aMapIt.Key();
- const TColStd_SequenceOfAsciiString& aValues = aMapIt.Value();
+ const Handle(TColStd_HSequenceOfAsciiString)& aValues = aMapIt.Value();
- if (!(aKey.IsEqual ("SCALE") && (aValues.Length() == 1 || aValues.IsEmpty()))
- && !(aKey.IsEqual ("SIZE") && (aValues.Length() == 1 || aValues.IsEmpty()))
- && !(aKey.IsEqual ("EYE") && (aValues.Length() == 3 || aValues.IsEmpty()))
- && !(aKey.IsEqual ("AT") && (aValues.Length() == 3 || aValues.IsEmpty()))
- && !(aKey.IsEqual ("UP") && (aValues.Length() == 3 || aValues.IsEmpty()))
- && !(aKey.IsEqual ("PROJ") && (aValues.Length() == 3 || aValues.IsEmpty()))
- && !(aKey.IsEqual ("CENTER") && aValues.Length() == 2))
+ if (!(aKey.IsEqual ("SCALE") && (aValues->Length() == 1 || aValues->IsEmpty()))
+ && !(aKey.IsEqual ("SIZE") && (aValues->Length() == 1 || aValues->IsEmpty()))
+ && !(aKey.IsEqual ("EYE") && (aValues->Length() == 3 || aValues->IsEmpty()))
+ && !(aKey.IsEqual ("AT") && (aValues->Length() == 3 || aValues->IsEmpty()))
+ && !(aKey.IsEqual ("UP") && (aValues->Length() == 3 || aValues->IsEmpty()))
+ && !(aKey.IsEqual ("PROJ") && (aValues->Length() == 3 || aValues->IsEmpty()))
+ && !(aKey.IsEqual ("CENTER") && aValues->Length() == 2))
{
TCollection_AsciiString aLowerKey;
aLowerKey = "-";
}
}
- TColStd_SequenceOfAsciiString aValues;
+ Handle(TColStd_HSequenceOfAsciiString) aValues;
// Change view parameters in proper order
if (aMapOfKeysByValues.Find ("SCALE", aValues))
{
- if (aValues.IsEmpty())
+ if (aValues->IsEmpty())
{
theDi << "Scale: " << anAISView->Scale() << "\n";
}
else
{
- anAISView->SetScale (aValues (1).RealValue());
+ anAISView->SetScale (aValues->Value(1).RealValue());
}
}
if (aMapOfKeysByValues.Find ("SIZE", aValues))
{
- if (aValues.IsEmpty())
+ if (aValues->IsEmpty())
{
Standard_Real aSizeX = 0.0;
Standard_Real aSizeY = 0.0;
}
else
{
- anAISView->SetSize (aValues (1).RealValue());
+ anAISView->SetSize (aValues->Value(1).RealValue());
}
}
if (aMapOfKeysByValues.Find ("EYE", aValues))
{
- if (aValues.IsEmpty())
+ if (aValues->IsEmpty())
{
Standard_Real anEyeX = 0.0;
Standard_Real anEyeY = 0.0;
}
else
{
- anAISView->SetEye (aValues (1).RealValue(), aValues (2).RealValue(), aValues (3).RealValue());
+ anAISView->SetEye (aValues->Value(1).RealValue(), aValues->Value(2).RealValue(), aValues->Value(3).RealValue());
}
}
if (aMapOfKeysByValues.Find ("AT", aValues))
{
- if (aValues.IsEmpty())
+ if (aValues->IsEmpty())
{
Standard_Real anAtX = 0.0;
Standard_Real anAtY = 0.0;
}
else
{
- anAISView->SetAt (aValues (1).RealValue(), aValues (2).RealValue(), aValues (3).RealValue());
+ anAISView->SetAt (aValues->Value(1).RealValue(), aValues->Value(2).RealValue(), aValues->Value(3).RealValue());
}
}
if (aMapOfKeysByValues.Find ("PROJ", aValues))
{
- if (aValues.IsEmpty())
+ if (aValues->IsEmpty())
{
Standard_Real aProjX = 0.0;
Standard_Real aProjY = 0.0;
}
else
{
- anAISView->SetProj (aValues (1).RealValue(), aValues (2).RealValue(), aValues (3).RealValue());
+ anAISView->SetProj (aValues->Value(1).RealValue(), aValues->Value(2).RealValue(), aValues->Value(3).RealValue());
}
}
if (aMapOfKeysByValues.Find ("UP", aValues))
{
- if (aValues.IsEmpty())
+ if (aValues->IsEmpty())
{
Standard_Real anUpX = 0.0;
Standard_Real anUpY = 0.0;
}
else
{
- anAISView->SetUp (aValues (1).RealValue(), aValues (2).RealValue(), aValues (3).RealValue());
+ anAISView->SetUp (aValues->Value(1).RealValue(), aValues->Value(2).RealValue(), aValues->Value(3).RealValue());
}
}
if (aMapOfKeysByValues.Find ("CENTER", aValues))
{
- anAISView->SetCenter (aValues (1).IntegerValue(), aValues (2).IntegerValue());
+ anAISView->SetCenter (aValues->Value(1).IntegerValue(), aValues->Value(2).IntegerValue());
}
return 0;