Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkAF_ViewPopup.cxx

Go to the documentation of this file.
00001 
00002 //   exotkAF_ViewPopup.cxx
00004 //    Copyright (C) 2001  Stephane Routelous
00005 //
00006 //    This file is part of exoTK.
00007 //
00008 //    exoTK is free software; you can redistribute it and/or modify
00009 //    it under the terms of the GNU General Public License as published by
00010 //    the Free Software Foundation; either version 2 of the License, or
00011 //    (at your option) any later version.
00012 //
00013 //    exoTK is distributed in the hope that it will be useful,
00014 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //    GNU General Public License for more details.
00017 //
00018 //    You should have received a copy of the GNU General Public License
00019 //    along with exoTK; if not, write to the Free Software
00020 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00028 #include <exotkAF_ViewPopup.hxx>
00029 #ifndef  _exotkAF_ViewTypeMenuNode_HeaderFile
00030 #include <exotkAF_ViewTypeMenuNode.hxx>
00031 #endif
00032 #ifndef  _exotkAF_ViewType_HeaderFile
00033 #include <exotkAF_ViewType.hxx>
00034 #endif
00035 #ifndef  _exotkAF_ViewBackgroundColorMenuNode_HeaderFile
00036 #include <exotkAF_ViewBackgroundColorMenuNode.hxx>
00037 #endif
00038 #ifndef  _exotkAF_ViewHLRMenuNode_HeaderFile
00039 #include <exotkAF_ViewHLRMenuNode.hxx>
00040 #endif
00041 #ifndef  _exotkAF_ViewAntialiasingMenuNode_HeaderFile
00042 #include <exotkAF_ViewAntialiasingMenuNode.hxx>
00043 #endif
00044 #ifndef  _exotkAF_ViewFitMenuNode_HeaderFile
00045 #include <exotkAF_ViewFitMenuNode.hxx>
00046 #endif
00047 //
00048 IMPLEMENT_STANDARD_HANDLE(exotkAF_ViewPopup, exotkTree_Menu)
00049 IMPLEMENT_STANDARD_RTTI(exotkAF_ViewPopup, exotkTree_Menu)
00050 //
00051 // Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and 
00052 // a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
00053 // We must respect the order: from the direct ancestor class
00054 // to the base class.
00055 //
00056 
00057 IMPLEMENT_STANDARD_TYPE(exotkAF_ViewPopup)
00058 IMPLEMENT_STANDARD_SUPERTYPE(exotkTree_Menu) 
00059 IMPLEMENT_STANDARD_SUPERTYPE(exotkTree_Tree) 
00060 IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared) 
00061 IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
00062 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
00063 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(exotkTree_Menu)
00064 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(exotkTree_Tree)
00065 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared)
00066 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient)
00067 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
00068 IMPLEMENT_STANDARD_TYPE_END(exotkAF_ViewPopup)
00069 
00070 
00071 
00072 //==================================================================================
00073 // Function name        : exotkAF_ViewPopup::exotkAF_ViewPopup
00074 //==================================================================================
00075 // Written by       : Stephane Routelous - 2001-11-06 15:54:05
00076 // Description      : 
00077 // Return type          : 
00078 //==================================================================================
00079 exotkAF_ViewPopup::exotkAF_ViewPopup()
00080 {
00081 }
00082 
00083 
00084 //==================================================================================
00085 // Function name        : exotkAF_ViewPopup::~exotkAF_ViewPopup
00086 //==================================================================================
00087 // Written by       : Stephane Routelous - 2001-11-06 15:54:07
00088 // Description      : 
00089 // Return type          : 
00090 //==================================================================================
00091 exotkAF_ViewPopup::~exotkAF_ViewPopup()
00092 {
00093 }
00094 
00095 
00096 //==================================================================================
00097 // Function name        : exotkAF_ViewPopup::Create
00098 //==================================================================================
00099 // Written by       : Stephane Routelous - 2001-11-06 15:54:09
00100 // Description      : 
00101 // Return type          : Standard_Boolean 
00102 //==================================================================================
00103 // Argument         : const Handle_exotkAF_View &aView
00104 Standard_Boolean exotkAF_ViewPopup::Create(const Handle_exotkAF_View &aView)
00105 {
00106         Handle_exotkTree_MenuNode theRoot = new exotkTree_MenuNode();
00107         SetRoot(theRoot);
00108         Handle_exotkAF_ViewFitMenuNode theFitAllMenuNode = new exotkAF_ViewFitMenuNode(aView);
00109         theRoot->AppendChild(theFitAllMenuNode);
00110         Handle_exotkTree_MenuNode theTopViewTypeNode = new exotkTree_MenuNode();
00111         theTopViewTypeNode->SetName("View Type");
00112         AddViewType(theTopViewTypeNode, exotkAF_vtAxo, "Axo", aView);
00113         AddViewType(theTopViewTypeNode, exotkAF_vtFront, "Front", aView);
00114         AddViewType(theTopViewTypeNode, exotkAF_vtBack, "Back", aView);
00115         AddViewType(theTopViewTypeNode, exotkAF_vtRight, "Right", aView);
00116         AddViewType(theTopViewTypeNode, exotkAF_vtLeft, "Left", aView);
00117         AddViewType(theTopViewTypeNode, exotkAF_vtTop, "Top", aView);
00118         AddViewType(theTopViewTypeNode, exotkAF_vtBottom, "Bottom", aView);
00119         theRoot->AppendChild(theTopViewTypeNode);
00120         theRoot->AddSeparator();
00121         Handle_exotkAF_ViewHLRMenuNode theHLRNode = new exotkAF_ViewHLRMenuNode(aView);
00122         theRoot->AppendChild(theHLRNode);
00123         Handle_exotkAF_ViewAntialiasingMenuNode theAntialiasingNode = new exotkAF_ViewAntialiasingMenuNode(aView);
00124         theRoot->AppendChild(theAntialiasingNode);
00125         theRoot->AddSeparator();
00126         Handle_exotkAF_ViewBackgroundColorMenuNode theBkNode = new exotkAF_ViewBackgroundColorMenuNode(aView);
00127         theRoot->AppendChild(theBkNode);
00128         
00129         return Standard_True;
00130 }
00131 
00132 //==================================================================================
00133 // Function name        : exotkAF_ViewPopup::AddViewType
00134 //==================================================================================
00135 // Written by       : Stephane Routelous - 2001-11-06 15:54:12
00136 // Description      : 
00137 // Return type          : void 
00138 //==================================================================================
00139 // Argument         : const Handle_exotkTree_MenuNode& aNode
00140 // Argument         : const enum exotkAF_ViewType aType
00141 // Argument         : const TCollection_AsciiString& aName
00142 // Argument         : const Handle_exotkAF_View& aView
00143 void exotkAF_ViewPopup::AddViewType(const Handle_exotkTree_MenuNode& aNode, const enum exotkAF_ViewType aType, const TCollection_AsciiString& aName, const Handle_exotkAF_View& aView)
00144 {
00145         Handle_exotkAF_ViewTypeMenuNode theNode = new exotkAF_ViewTypeMenuNode(aView, aType);
00146         theNode->SetName(aName);
00147         aNode->AppendChild(theNode);
00148 }

Generated on Wed Jan 23 12:16:40 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001