1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SUPERVGUI_CanvasControlNode.cxx
23 // Author : Natalia KOPNOVA
26 #include "SUPERVGUI_CanvasControlNode.h"
27 #include "SUPERVGUI_CanvasControlNodePrs.h"
28 #include "SUPERVGUI_CanvasCellNodePrs.h"
29 #include "SUPERVGUI_CanvasLink.h"
30 #include "SUPERVGUI_Clipboard.h"
31 #include "SUPERVGUI_Main.h"
32 #include "SUPERVGUI.h"
33 #include "SUPERVGUI_Canvas.h"
35 #include "SUIT_FileDlg.h"
36 #include "SUIT_Session.h"
41 //=====================================================================
43 //=====================================================================
44 SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode (SUIT_ResourceMgr* mgr, QObject* theParent,
45 SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
46 SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode)
48 Trace("SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode");
51 SUPERVGUI_CanvasComputeNode* SUPERVGUI_CanvasComputeNode::Create
52 (SUIT_ResourceMgr* mgr, QObject* theParent,
53 SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
55 SUPERVGUI_CanvasComputeNode* aRet = new SUPERVGUI_CanvasComputeNode (mgr, theParent, theMain, theNode);
56 emit aRet->objectCreatedDeleted();
60 QPopupMenu* SUPERVGUI_CanvasComputeNode::getPopupMenu(QWidget* theParent)
62 QPopupMenu* popup = SUPERVGUI_CanvasNode::getPopupMenu(theParent);
64 QPopupMenu* aShowPopup = new QPopupMenu(theParent);
66 anItem = aShowPopup->insertItem(tr("POP_SHOWTITLES"), this, SLOT(switchLabel()));
67 aShowPopup->setItemChecked(anItem, getPrs()->isLabelVisible());
68 anItem = aShowPopup->insertItem(tr("POP_SHOWPORTS"), this, SLOT(switchPorts()));
69 aShowPopup->setItemChecked(anItem, getPrs()->isPortVisible());
71 popup->insertSeparator();
72 popup->insertItem(tr("POP_SHOW"), aShowPopup);
78 //=====================================================================
80 //=====================================================================
81 SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode (SUIT_ResourceMgr* mgr, QObject* theParent,
82 SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
83 SUPERVGUI_CanvasNode( mgr, theParent, theMain, theNode),
86 Trace("SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode");
89 SUPERVGUI_CanvasStartNode* SUPERVGUI_CanvasStartNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
90 SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
92 SUPERVGUI_CanvasStartNode* aRet = new SUPERVGUI_CanvasStartNode (mgr, theParent, theMain, theNode);
93 emit aRet->objectCreatedDeleted();
97 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasStartNode::createPrs() const
99 return new SUPERVGUI_CanvasStartNodePrs (resMgr(), getMain()->getCanvas(),
100 (SUPERVGUI_CanvasStartNode*)this);
103 bool SUPERVGUI_CanvasStartNode::setNodeName(QString aName)
105 bool result = SUPERVGUI_CanvasNode::setNodeName(aName);
106 if (result && myCoupled) {
107 myCoupled->setNodeName(QString(tr("ENDNODE_PREFIX"))+aName);
112 QPopupMenu* SUPERVGUI_CanvasStartNode::getPopupMenu(QWidget* theParent)
114 QPopupMenu* popup = SUPERVGUI_CanvasNode::getPopupMenu(theParent);
116 popup->insertSeparator();
117 int anItem = popup->insertItem(tr("POP_HIDEPORTS"), this, SLOT(switchPorts()));
118 popup->setItemChecked(anItem, !getPrs()->isPortVisible());
123 void SUPERVGUI_CanvasStartNode::remove()
125 SUPERVGUI_Canvas* aCanvas = getMain()->getCanvas();
128 SUPERVGUI_Clipboard* aCB = SUPERVGUI_Clipboard::getClipboard();
131 //set myCopyPort from Main object to empty if engine of this port is deleted
132 //check if any port of this deleted node has been copied
133 if ( aCB->isCopyPort() )
134 if ( QString(getEngine()->Name()) == QString(aCB->getCopyPort()->Node()->Name()) ||
135 QString(myCoupled->getEngine()->Name()) == QString(aCB->getCopyPort()->Node()->Name()) )
136 aCB->setCopyPort( 0 );
138 myCoupled->setDestroyed();
141 //set myCopyNode from Main object to empty if engine of this node is deleted
142 //check if myCopyNode and this node engine is equal
143 if ( aCB->isCopyNode() )
144 if ( QString(getEngine()->Name()) == QString(aCB->getCopyNode()->Name()) )
145 aCB->setCopyNode( 0 );
147 // mkr: since the deletion of the node allow only in CANVAS view,
148 // it is necessary to remove the CanvasArray's children, which
149 // have the same CNode engine as deleting node
150 getMain()->removeArrayChild(getEngine());
151 getMain()->removeArrayChild(myCoupled->getEngine());
153 getEngine()->destroy();
158 emit objectCreatedDeleted(); // jfa : NPAL15529
165 void SUPERVGUI_CanvasStartNode::onDestroyed(QObject* theObject)
168 SUPERVGUI_CanvasNode::onDestroyed(theObject);
169 if (getEngine()->IsLoop()) merge();
170 if (myCoupled) myCoupled->merge();
174 // mkr : IPAL9815 : commented the following code
175 /*void SUPERVGUI_CanvasStartNode::addInputPort()
177 SUPERVGUI_CanvasNode::addInputPort();
178 if (getEngine()->IsLoop()) merge();
179 if (myCoupled) myCoupled->merge();
182 void SUPERVGUI_CanvasStartNode::addOutputPort()
184 SUPERVGUI_CanvasNode::addOutputPort();
185 if (myCoupled) myCoupled->merge();
188 void SUPERVGUI_CanvasStartNode::pastePort()
190 SUPERVGUI_Clipboard* aCB = SUPERVGUI_Clipboard::getClipboard();
191 SUPERVGUI_CanvasNode::pastePort();
192 if ( aCB->getCopyPort()->IsInput() && getEngine()->IsLoop() )
198 //=====================================================================
200 //=====================================================================
201 SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode (SUIT_ResourceMgr* mgr, QObject* theParent,
202 SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
203 SUPERVGUI_CanvasStartNode* theStart):
204 SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode),
207 Trace("SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode");
208 myCoupled->setCoupled(this);
211 SUPERVGUI_CanvasEndNode* SUPERVGUI_CanvasEndNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
212 SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
213 SUPERVGUI_CanvasStartNode* theStart)
215 SUPERVGUI_CanvasEndNode* aRet = new SUPERVGUI_CanvasEndNode (mgr, theParent, theMain, theNode, theStart);
216 emit aRet->objectCreatedDeleted();
220 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasEndNode::createPrs() const
222 return new SUPERVGUI_CanvasEndNodePrs( resMgr(), getMain()->getCanvas(),
223 (SUPERVGUI_CanvasEndNode*)this);
226 QPopupMenu* SUPERVGUI_CanvasEndNode::getPopupMenu(QWidget* theParent)
228 QPopupMenu* popup = SUPERVGUI_CanvasNode::getPopupMenu(theParent);
230 popup->insertSeparator();
231 int anItem = popup->insertItem(tr("POP_HIDEPORTS"), this, SLOT(switchPorts()));
232 popup->setItemChecked(anItem, !getPrs()->isPortVisible());
237 // mkr : IPAL9815 : commented the following code
238 /*void SUPERVGUI_CanvasEndNode::addInputPort()
240 SUPERVGUI_CanvasNode::addInputPort();
241 if (getEngine()->IsEndSwitch()) merge();
245 //=====================================================================
247 //=====================================================================
248 SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode (SUIT_ResourceMgr* mgr, QObject* theParent,
249 SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
250 SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode)
252 Trace("SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode");
255 SUPERVGUI_CanvasGotoNode* SUPERVGUI_CanvasGotoNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
256 SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
258 SUPERVGUI_CanvasGotoNode* aRet = new SUPERVGUI_CanvasGotoNode (mgr, theParent, theMain, theNode);
259 emit aRet->objectCreatedDeleted();
263 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasGotoNode::createPrs() const
265 return new SUPERVGUI_CanvasGotoNodePrs( resMgr(), getMain()->getCanvas(),
266 (SUPERVGUI_CanvasGotoNode*)this);
269 QPopupMenu* SUPERVGUI_CanvasGotoNode::getPopupMenu(QWidget* theParent)
271 QPopupMenu* popup = SUPERVGUI_CanvasNode::getPopupMenu(theParent);
273 popup->insertSeparator();
274 popup->insertItem("Link to Node...", this, SLOT(linkToNode()));
276 popup->insertSeparator();
277 int anItem = popup->insertItem(tr("POP_HIDEPORTS"), this, SLOT(switchPorts()));
278 popup->setItemChecked(anItem, !getPrs()->isPortVisible());
283 void SUPERVGUI_CanvasGotoNode::linkToNode() {
284 SUPERVGUI_SelectInlineDlg* aDlg = new SUPERVGUI_SelectInlineDlg(getMain());
286 QString aNodeName = aDlg->getName();
287 if (!aNodeName.isEmpty()) { //implement additional check from GUI side for bug PAL7007
288 // mkr : here we should re/create (if it is not yet exists) a presentation for new
289 // Goto(OutGate)->CoupledNode(InGate) link, which will be created in SetCoupled method
291 // check if GoTo node have coupled node
292 SUPERV_INode aCoupledNode = getGotoNode()->Coupled();
293 if ( !SUPERV_isNull(aCoupledNode) )
294 { // we got old coupled node
295 SUPERV_Port anInGatePort = aCoupledNode->GetInPort("InGate");
296 SUPERV_Link anOldLinkEngine = anInGatePort->Link();
297 if ( !SUPERV_isNull(anOldLinkEngine) )
298 { // we got old link engine
299 SUPERVGUI_CanvasLink* anOldLinkPrs = getMain()->getCanvas()->getLink(anOldLinkEngine);
301 { // delete old link presentation
308 getGotoNode()->SetCoupled(aNodeName.latin1());
310 aCoupledNode = SUPERV::INode::_narrow(getMain()->getDataflow()->Node(aNodeName.latin1()));
311 if ( !SUPERV_isNull(aCoupledNode) )
312 { // we got new coupled node
313 SUPERV_Port anInGatePort = aCoupledNode->GetInPort("InGate");
314 SUPERV_Link aLinkEngine = anInGatePort->Link();
315 if ( !SUPERV_isNull(aLinkEngine) )
316 { // we got new link engine
317 if ( !getMain()->getCanvas()->getLink(aLinkEngine) )
318 { // there is no presentation for such link engine => create it
319 SUPERVGUI_CanvasLink* aLink = new SUPERVGUI_CanvasLink(getMain()->getCanvas(), getMain(), aLinkEngine);
325 getMain()->getCanvas()->sync();
331 //=====================================================================
333 //=====================================================================
334 SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode (SUIT_ResourceMgr* mgr, QObject* theParent,
335 SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
336 SUPERVGUI_CanvasComputeNode(mgr, theParent, theMain, theNode)
338 Trace("SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode");
341 SUPERVGUI_CanvasMacroNode* SUPERVGUI_CanvasMacroNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
342 SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
344 SUPERVGUI_CanvasMacroNode* aRet = new SUPERVGUI_CanvasMacroNode (mgr, theParent, theMain, theNode);
345 emit aRet->objectCreatedDeleted();
349 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasMacroNode::createPrs() const
351 return new SUPERVGUI_CanvasMacroNodePrs( resMgr(), getMain()->getCanvas(),
352 (SUPERVGUI_CanvasMacroNode*)this);
355 QPopupMenu* SUPERVGUI_CanvasMacroNode::getPopupMenu(QWidget* theParent)
357 QPopupMenu* popup = SUPERVGUI_CanvasComputeNode::getPopupMenu(theParent);
359 popup->insertSeparator(0);
360 popup->insertItem(tr("MSG_EXPORT"), this, SLOT(exportDataflow()), 0, -1, 0);
361 popup->insertItem("Open SubGraph", this, SLOT(openSubGraph()), 0, -1, 0);
366 void SUPERVGUI_CanvasMacroNode::openSubGraph()
368 getMain()->openSubGraph(getEngine());
371 void SUPERVGUI_CanvasMacroNode::exportDataflow()
374 if (getEngine()->IsMacro()) {
375 SUPERV_Graph aMacro = getMacroNode();
376 if (aMacro->IsStreamMacro())
377 aGraph = aMacro->StreamObjRef();
379 aGraph = aMacro->FlowObjRef();
381 if (SUPERV_isNull(aGraph)) {
382 QMessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(), tr("WARNING"), tr("MSG_NOWINDOW_TO_EXPORT"));
386 QString aFileName = SUIT_FileDlg::getFileName(SUIT_Session::session()->activeApplication()->desktop(),
389 tr("TTL_EXPORT_DATAFLOW"),
391 if ( !aFileName.isEmpty() ) {
392 // asv : bug [VSR Bugs and Improvements in Supervisor] 1.8 : when exporting a file,
393 // a backup copy of an existing file must be created (in case Export fails..)
394 QString aBackupFile = SUPERVGUI::createBackupFile( aFileName );
396 if (!aGraph->Export(aFileName.latin1())) {
397 QMessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_BAD_WRITING").arg(aBackupFile));
399 // remove a backup file if export was successfull
400 else if ( !aBackupFile.isNull() && !aBackupFile.isEmpty() ) {
401 QFile::remove( aBackupFile );
407 // mkr : IPAL11549 : before remove Macro Node we have to destroy
408 // all its opened sub-graphs
409 void SUPERVGUI_CanvasMacroNode::remove()
412 if (getEngine()->IsMacro()) {
413 SUPERV_Graph aMacro = getMacroNode();
414 if (aMacro->IsStreamMacro())
415 aGraph = aMacro->StreamObjRef();
417 aGraph = aMacro->FlowObjRef();
419 if (SUPERV_isNull(aGraph)) {
420 QMessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(), tr("WARNING"), tr("MSG_NOSUBGRAPH_TO_REMOVE"));
424 getMain()->destroySubGraph(aGraph->Name());
427 SUPERVGUI_CanvasNode::remove();
430 //=====================================================================
431 // Cell node: node for table view
432 //=====================================================================
433 SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode (SUIT_ResourceMgr* mgr, QObject* theParent,
434 SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
435 SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode, true)
437 Trace("SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode");
442 //check for control nodes
443 if (getEngine()->IsLoop() || getEngine()->IsSwitch()) {
447 if (getEngine()->IsEndLoop() || getEngine()->IsEndSwitch())
451 SUPERVGUI_CanvasCellNode* SUPERVGUI_CanvasCellNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
452 SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
454 SUPERVGUI_CanvasCellNode* aRet = new SUPERVGUI_CanvasCellNode (mgr, theParent, theMain, theNode);
455 emit aRet->objectCreatedDeleted();
459 SUPERVGUI_CanvasCellNode::~SUPERVGUI_CanvasCellNode()
463 QPopupMenu* SUPERVGUI_CanvasCellNode::getPopupMenu(QWidget* theParent)
465 QPopupMenu* popup = SUPERVGUI_CanvasNode::getPopupMenu(theParent);
466 popup->setItemEnabled(myDeleteItem, false);
470 void SUPERVGUI_CanvasCellNode::setPairCell(SUPERVGUI_CanvasCellNode* thePairCell) {
471 if (myIsControl) { //only for ControlNode
472 myPairCell = thePairCell;
478 SUPERVGUI_CanvasCellNode* SUPERVGUI_CanvasCellNode::getPairCell() {
482 void SUPERVGUI_CanvasCellNode::sync() {
483 const bool isExecuting = getMain()->getDataflow()->IsExecuting();
484 //if getEngine() is a MacroNode then set it state to state of its subgraph
485 if ( getEngine()->IsMacro() && isExecuting ) {
486 // get SubGraph from MacroNode
487 SUPERV_Graph aMacro = SUPERV::Graph::_narrow(getEngine());
488 if (!SUPERV_isNull(aMacro)) {
490 if (aMacro->IsStreamMacro())
491 aGraph = aMacro->StreamObjRef();
493 aGraph = aMacro->FlowObjRef();
494 if (!SUPERV_isNull(aGraph)) {
495 if (aGraph->State() != SUPERV::UndefinedState && aGraph->State() != SUPERV::NoState)
496 getPrs()->setState(aGraph->State());
498 getPrs()->setState(getEngine()->State());
503 getPrs()->setState(getEngine()->State());
507 bool SUPERVGUI_CanvasCellNode::setNodeName(QString aName)
509 bool result = SUPERVGUI_CanvasNode::setNodeName(aName);
510 if (result && myPairCell) {
511 result = myPairCell->setNodeName(QString(tr("ENDNODE_PREFIX"))+aName);
516 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasCellNode::createPrs() const
518 SUPERVGUI_CanvasNodePrs* aPrs =
519 new SUPERVGUI_CanvasCellNodePrs( resMgr(), getMain()->getCanvasArray(),
520 (SUPERVGUI_CanvasCellNode*)this);
524 SUPERVGUI_CanvasCellEndNode::SUPERVGUI_CanvasCellEndNode (SUIT_ResourceMgr* mgr, QObject* theParent,
525 SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
526 SUPERVGUI_CanvasCellNode* theStart):
527 SUPERVGUI_CanvasCellNode(mgr, theParent, theMain, theNode)
529 //set start cell for end cell as pair
530 myPairCell = theStart;
531 //set end cell for start cell as pair
532 myPairCell->setPairCell(dynamic_cast<SUPERVGUI_CanvasCellNode*>(this));
535 SUPERVGUI_CanvasCellEndNode* SUPERVGUI_CanvasCellEndNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
536 SUPERVGUI_Main* theMain,
537 SUPERV_CNode theNode,
538 SUPERVGUI_CanvasCellNode* theStart)
540 SUPERVGUI_CanvasCellEndNode* aRet =
541 new SUPERVGUI_CanvasCellEndNode (mgr, theParent, theMain, theNode, theStart);
542 emit aRet->objectCreatedDeleted();
547 bool SUPERVGUI_CanvasCellEndNode::setNodeName(QString theName)
549 return SUPERVGUI_CanvasNode::setNodeName(theName);
553 //-----------------------------------------------------------
554 //*************** Select Inline node dialog******************
555 // Taken from SUPERVGUI_ControlNode.cxx without change
556 //-----------------------------------------------------------
558 SUPERVGUI_SelectInlineDlg::SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain)
559 :QDialog(theMain, 0, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
561 setSizeGripEnabled( true );
562 setCaption(tr("TIT_FUNC_PYTHON"));
563 QGridLayout* aMainLayout = new QGridLayout(this, 2, 2, 7, 4);
565 QLabel* aLabel = new QLabel("Connect to", this );
566 aMainLayout->addWidget(aLabel, 0, 0);
568 myCombo = new QComboBox(this);
569 myCombo->clear(); //for the additional check from GUI side for bug PAL7007
570 SUPERV_Nodes aNodesList = theMain->getDataflow()->Nodes();
572 for (i = 0; i < aNodesList->INodes.length(); i++) {
573 myCombo->insertItem(QString(aNodesList->INodes[i]->Name()));
575 for (i = 0; i < aNodesList->LNodes.length(); i++) {
576 myCombo->insertItem(QString(aNodesList->LNodes[i]->Name()));
578 for (i = 0; i < aNodesList->SNodes.length(); i++) {
579 myCombo->insertItem(QString(aNodesList->SNodes[i]->Name()));
581 aMainLayout->addWidget(myCombo, 0, 1);
583 QGroupBox* aBtnBox = new QGroupBox( this );
584 aBtnBox->setColumnLayout( 0, Qt::Vertical );
585 aBtnBox->layout()->setSpacing( 0 ); aBtnBox->layout()->setMargin( 0 );
586 QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() );
587 aBtnLayout->setAlignment( Qt::AlignTop );
588 aBtnLayout->setSpacing( 6 ); aBtnLayout->setMargin( 11 );
590 QPushButton* aOKBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox );
591 connect( aOKBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
592 aBtnLayout->addWidget( aOKBtn );
594 aBtnLayout->addStretch();
596 QPushButton* aCancelBtn = new QPushButton( tr("BUT_CANCEL"), aBtnBox );
597 connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
598 aBtnLayout->addWidget( aCancelBtn );
600 aMainLayout->addMultiCellWidget(aBtnBox, 1, 1, 0, 1);