Exemple #1
0
void wxPanel::OnSize(wxSizeEvent& event)
{
    if (GetAutoLayout())
        Layout();
#if wxUSE_CONSTRAINTS
#if defined(__WXPM__) && 0
    else
    {
        // Need to properly move child windows under OS/2

        PSWP                        pWinSwp = GetSwp();

        if (pWinSwp->cx == 0 && pWinSwp->cy == 0 && pWinSwp->fl == 0)
        {
            // Uninitialized

            ::WinQueryWindowPos(GetHWND(), pWinSwp);
        }
        else
        {
            SWP                     vSwp;
            int                     nYDiff;

            ::WinQueryWindowPos(GetHWND(), &vSwp);
            nYDiff = pWinSwp->cy - vSwp.cy;
            MoveChildren(nYDiff);
            pWinSwp->cx = vSwp.cx;
            pWinSwp->cy = vSwp.cy;
        }
    }
#endif
#endif // wxUSE_CONSTRAINTS

    event.Skip();
}
void SceneNode::Move(const glm::vec3& pos, bool moveChildren /* = false */)
{
    // Move this node
    mTransform.Move(pos);

    // Move children (if necessary)
    if(moveChildren)
        MoveChildren(pos);
}
Exemple #3
0
// include a endtag in to the QSgml-class
void QSgml::HandleEndTag(const QString &SgmlString,QSgmlTag* &pLastTag,int &iStart,int &iEnd,int &iPos)
{
    QString sDummy;
    QSgmlTag *pTag;
    QSgmlTag *pDummyTag;

    iStart = iPos;
    FindEnd(SgmlString,iPos);
    iEnd = iPos;
    sDummy = SgmlString.mid(iStart + 1,iEnd - iStart - 1).trimmed();

    pTag = new QSgmlTag(sDummy,QSgmlTag::eEndTag,pLastTag);

    // find a fitting start-tag
    pDummyTag = pLastTag;
    while( (pDummyTag->Name!=pTag->Name)&&(pDummyTag->Parent!=NULL) )
        pDummyTag = pDummyTag->Parent;
    delete pTag;

    if( pDummyTag->Parent!=NULL ) // start-tag found
    {
        while( pLastTag!=pDummyTag ) // all tags in between are standalone tags
        {
            pLastTag->Type = QSgmlTag::eStandalone;
            MoveChildren( pLastTag,pLastTag->Parent );
            pLastTag = pLastTag->Parent;
        }

        // set data in start-tag
        pLastTag->EndTagPos = iStart;
        pLastTag->EndTagLength = iEnd - iStart + 1;

        // tags which have no children are special (script can't be a standalone-tag)
        if( pLastTag->Children.count()==0 )
        {
            pLastTag->Type = QSgmlTag::eStartEmpty;
        }
        pLastTag = pLastTag->Parent;
    }
    else
    {
        // no start-tag -> end
        pLastTag->Children.append( EndTag );
        iPos = -1;
    }
}
Exemple #4
0
 void Move(const PixelRect &rc) override {
   const Layout layout(rc, look);
   waypoint_panel.Move(layout.waypoint_panel);
   tp_panel.Move(layout.tp_panel);
   MoveChildren(layout);
 }