本文整理汇总了C++中Output::FollowMouseAndDraw方法的典型用法代码示例。如果您正苦于以下问题:C++ Output::FollowMouseAndDraw方法的具体用法?C++ Output::FollowMouseAndDraw怎么用?C++ Output::FollowMouseAndDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Output
的用法示例。
在下文中一共展示了Output::FollowMouseAndDraw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
void AddGate::Execute()
{
//Get a Pointer to the Input / Output Interfaces
Output* pOut = pManager->GetOutput();
Input* pIn = pManager->GetInput();
//A generic gate pointer to hold any type of gate to be added
Gate *pG = NULL;
//Create new object of a gate according to the type of the action
switch (ActType)
{
case ADD_AND_GATE_2:
{
pG = new AND2(GInfo, AND2_FANOUT);
break;
}
case ADD_OR_GATE_2:
{
pG = new OR2(GInfo, AND2_FANOUT);
break;
}
case ADD_Buff:
{
pG = new BUFFER(GInfo, AND2_FANOUT);
break;
}
case ADD_INV:
{
pG = new NOT(GInfo, AND2_FANOUT);
break;
}
case ADD_NAND_GATE_2:
{
pG = new NAND2(GInfo, AND2_FANOUT);
break;
}
case ADD_NOR_GATE_2:
{
pG = new NOR2(GInfo, AND2_FANOUT);
break;
}
case ADD_XOR_GATE_2:
{
pG = new XOR2(GInfo, AND2_FANOUT);
break;
}
case ADD_XNOR_GATE_2:
{
pG = new XNOR2(GInfo, AND2_FANOUT);
break;
}
case ADD_AND_GATE_3:
{
pG = new AND3(GInfo, AND2_FANOUT);
break;
}
case ADD_OR_GATE_3:
{
pG = new OR3(GInfo, AND2_FANOUT);
break;
}
case ADD_NAND_GATE_3:
{
pG = new NAND3(GInfo, AND2_FANOUT);
break;
}
case ADD_NOR_GATE_3:
{
pG = new NOR3(GInfo, AND2_FANOUT);
break;
}
case ADD_XOR_GATE_3:
{
pG = new XOR3(GInfo, AND2_FANOUT);
break;
}
case ADD_XNOR_GATE_3:
{
pG = new XNOR3(GInfo, AND2_FANOUT);
break;
}
}
//if redo draw the gate in it's initial position
if (REDO)
{
string GateImage = "Images\\PNG Gates\\", GateNumber;
stringstream ss;
ss << (int)ActType ;
ss >> GateNumber;
GateImage += GateNumber + ".png";
pManager->GetOutput()->DrawPNGImage(GateImage, GInfo);
pManager->AddComponent(pG);
return;
}
//if the gate wase successfully added this will return true and false if escape key was pressed to cancel the addition
if (pOut->FollowMouseAndDraw(pManager, pG))
pManager->AddComponent(pG), GInfo = pG->get_GraphicInfo();
//.........这里部分代码省略.........