当前位置: 首页>>代码示例>>C++>>正文


C++ PegRect::Set方法代码示例

本文整理汇总了C++中PegRect::Set方法的典型用法代码示例。如果您正苦于以下问题:C++ PegRect::Set方法的具体用法?C++ PegRect::Set怎么用?C++ PegRect::Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PegRect的用法示例。


在下文中一共展示了PegRect::Set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PegDecoratedWindow

DialWindow::DialWindow(const PegRect& Rect) :
    PegDecoratedWindow(Rect)
{
    Add(new PegTitle(gsWindowTitle));

    miDial1Dir = 1;
    miDial2Dir = 1;
    miDial1Val = 0;
    miDial2Val = 0;

    PegRect WinRect;

    WinRect.Set(50, 50, 199, 199);
    mpDial1 = new PegFiniteBitmapDial(WinRect, 180, 0, 0, 100,
                                      &gbdialbkg2Bitmap);

    WinRect.Shift(160, 0);
    mpDial2 = new PegFiniteBitmapDial(WinRect, 225, 315, -25, 125,
                                      &gbdialbkg3Bitmap,
                                      &gbDialAnchor1Bitmap);
    mpDial2->Style((mpDial2->Style() | DS_POLYNEEDLE) & ~DS_THINNEEDLE);
    mpDial2->SetNeedleColor(BLUE);

    Add(mpDial1);
    Add(new PegPrompt(105, 210, 40, gsZero, 101, FF_RECESSED | TJ_RIGHT |
                      TT_COPY));
    Add(mpDial2);
    Add(new PegPrompt(265, 210, 40, gsZero, 102, FF_RECESSED | TJ_RIGHT |
                      TT_COPY));

    WinRect.Shift(160, 0);
    mpDial3 = new PegFiniteBitmapDial(WinRect, 180, 90, 0, 100,
                                      &gbdialbkg4Bitmap, NULL,
                                      0);
    mpDial3->Style(FF_NONE | AF_TRANSPARENT | DS_THICKNEEDLE | DS_USERCOR |
                   DS_CLOCKWISE);
    mpDial3->SetCOR(123, 123);
    mpDial3->SetNeedleLength(65);
    mpDial3->SetColor(PCI_NORMAL, BLUE);
    Add(mpDial3);

    SetColor(PCI_NORMAL, GREEN);

    Add(new PegPrompt(425, 210, 40, gsZero, 101, FF_RECESSED | TJ_RIGHT |
                      TT_COPY));

    WinRect.Set(245, 240, 330, 270);
    Add(new PegTextButton(WinRect, gsChangeColor, IDB_CHANGECOLOR));
}
开发者ID:garyqinyu,项目名称:abv,代码行数:49,代码来源:main.cpp

示例2:

PegScreen *CreatePegScreen(void)
{
    PegRect Rect;
    Rect.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    PegScreen *pScreen = new SED1375Screen8(Rect);
    return pScreen;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:7,代码来源:1375scr8.cpp

示例3:

PegScreen *CreatePegScreen(CELTHPEG_InitParams_t celInitParam)
{
    PegRect Rect;
    Rect.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    PegScreen *pScreen = new L8BrcmScreen(Rect,celInitParam);
    return pScreen;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:7,代码来源:l8brcmscrn.cpp

示例4:

/*--------------------------------------------------------------------------*/
PegScreen *CreatePegScreen(void)
{
    PegRect Rect;
    Rect.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    PegScreen *pScreen = new Permedia2Screen(Rect);
    return pScreen;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:8,代码来源:permedia.cpp

示例5: PegAppInitialize

/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager* pPresentation)
{    
    PegRect Rect;
    Rect.Set(20, 20, 350, 350);
    ScaleWindow* pWindow = new ScaleWindow(Rect);
    pPresentation->Center(pWindow);
    pPresentation->Add(pWindow);
}
开发者ID:garyqinyu,项目名称:abv,代码行数:9,代码来源:main.cpp

示例6: PegAppInitialize

/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager *pPresent)
{
    PegRect WinRect;
    WinRect.Set(0, 0, 400, 300);
    TabWindow *pTab = new TabWindow(WinRect);
//    pPresent->Center(pTab);
    pPresent->Add(pTab);
}
开发者ID:garyqinyu,项目名称:abv,代码行数:9,代码来源:notebook.cpp

示例7: PegAppInitialize

void PegAppInitialize(PegPresentationManager *pPresentation)
{
PegRect Rect;
Rect.Set(MAINFRAME_LEFT-1, MAINFRAME_TOP-1, MAINFRAME_RIGHT+1, MAINFRAME_BOTTOM+1);

myWindow *mw = new myWindow(Rect);

pPresentation->Add(mw);
}
开发者ID:Cartix,项目名称:8Pool,代码行数:9,代码来源:main.cpp

示例8: PegWindow

/*--------------------------------------------------------------------------*/
MainMenu::MainMenu(SIGNED iLeft, SIGNED iTop) : 
    PegWindow(FF_NONE)
{
    PegRect ChildRect;

	mReal.Set(iLeft, iTop, iLeft + 49, iTop + 249);
    InitClient();
    AddStatus(PSF_MOVEABLE|PSF_SIZEABLE);

    ChildRect.Set(iLeft + 0, iTop + 200, iLeft + 49, iTop + 249);
	m_pMainMenuButton_SupFunction = new TVBitmapButton(ChildRect, &gbsuperfunctionBitmap, ID_MainMenu_Button_SupFunction);
    Add(m_pMainMenuButton_SupFunction);

	ChildRect.Set(iLeft + 0, iTop + 150, iLeft + 49, iTop + 199);
	m_pMainMenuButtonSupSetting = new TVBitmapButton(ChildRect, &gbsupersettingBitmap, ID_MainMenu_Button_SupSetting);
    Add(m_pMainMenuButtonSupSetting);

    ChildRect.Set(iLeft + 0, iTop + 100, iLeft + 49, iTop + 149);
	m_pMainMenuButtonSound = new TVBitmapButton(ChildRect, &gbsoundBitmap, ID_MainMenu_Button_Sound);
    Add(m_pMainMenuButtonSound);

    ChildRect.Set(iLeft + 0, iTop + 50, iLeft + 49, iTop + 99);
    m_pMainMenuButtonPicture = new TVBitmapButton(ChildRect, &gbpictureBitmap, ID_MainMenu_Buttion_Picture);
    Add(m_pMainMenuButtonPicture);

    ChildRect.Set(iLeft + 0, iTop + 0, iLeft + 49, iTop + 49);
	m_pMainMenuButtonFactorySetting = new TVBitmapButton(ChildRect, &gbfactoryBitmap, ID_MainMenu_Button_FactorySetting);
    Add(m_pMainMenuButtonFactorySetting);

    /* WB End Construction */
	m_pMainMenuButtonFactorySetting->SetTipString(LS(SID_MainMenu_Prompt_Factory));
	m_pMainMenuButton_SupFunction->SetTipString(LS(SID_MainMenu_Prompt_SuperFunction));
	m_pMainMenuButtonSupSetting->SetTipString(LS(SID_MainMenu_Prompt_SuperSetting));

	m_pMainMenuButtonSound->SetTipString(LS(SID_MainMenu_Prompt_Sound));
	m_pMainMenuButtonPicture->SetTipString(LS(SID_MainMenu_Prompt_Picture));

	m_pToolTip = NULL;
	m_pTVHelpWnd = NULL;
	m_nCurrentSubWndID = ID_MainMenu_Button_FactorySetting;


	Id(MAIN_MENU_ID);
}
开发者ID:garyqinyu,项目名称:abv,代码行数:45,代码来源:mainmenu.cpp

示例9: PegAppInitialize

/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager *pPresentation)
{
	// create the dialog and add it to PegPresentationManager:

	PegRect Rect;
	Rect.Set(0, 0, 240, 140);
	DialogWin *pWin = new DialogWin(Rect);
	pPresentation->Center(pWin);
	pPresentation->Add(pWin);
}
开发者ID:garyqinyu,项目名称:abv,代码行数:11,代码来源:dialog.cpp

示例10: DrawTextLine

/*--------------------------------------------------------------------------*/
void PegTextBox::DrawTextLine(SIGNED iLine, PegPoint Put, BOOL bFill)
{
    SIGNED iLineLength;
    PegRect FillRect;
    PEGCHAR *pGet = GetLineStart(iLine, &iLineLength);
    PegColor Color(muColors[PCI_NTEXT], muColors[PCI_NORMAL], CF_FILL);

    CheckBufLen(iLineLength);

    if (iLine == miMarkLine)
    {
        Color.Set(muColors[PCI_STEXT], muColors[PCI_SELECTED], CF_FILL);
        bFill = TRUE;
    }
    if (bFill)
    {
        FillRect.Set(mClient.wLeft + TB_WHITESPACE, Put.y, mClient.wRight - TB_WHITESPACE,
            Put.y + miLineHeight - 1);
        Rectangle(FillRect, Color, 0);
    }

    if (!pGet)
    {
        return;
    }

    Color.uFlags = CF_NONE;

    if (iLineLength > 0)
    {
        strncpy(mpBuf, pGet, iLineLength);
        mpBuf[iLineLength] = '\0';

        switch(Style() & TJ_MASK)
        {
        case TJ_RIGHT:
            iLineLength = TextWidth(mpBuf, mpFont);
            Put.x = mClient.wRight - iLineLength - TB_WHITESPACE;
            break;

        case TJ_CENTER:
            iLineLength = TextWidth(mpBuf, mpFont);
            Put.x = (mClient.Width() - iLineLength) / 2;
            Put.x += mClient.wLeft;
            break;

        case TJ_LEFT:
        default:
            break;
        }
        DrawText(Put, mpBuf, Color, mpFont, -1);
    }
}
开发者ID:garyqinyu,项目名称:abv,代码行数:54,代码来源:ptextbox.cpp

示例11: PegWindow

/*--------------------------------------------------------------------------*/
AGCMessageClass::AGCMessageClass(SIGNED iLeft, SIGNED iTop) : 
  PegWindow(FF_THIN)
{
	PegRect ChildRect;

	mReal.Set(iLeft, iTop, iLeft + 393, iTop + 39);
	InitClient();
	SetColor(PCI_NORMAL, 223);
	RemoveStatus(PSF_MOVEABLE|PSF_SIZEABLE|PSF_ACCEPTS_FOCUS);

	ChildRect.Set(iLeft + 30, iTop + 10, iLeft + 374, iTop + 29);
	pAGCMessage = new PegPrompt(ChildRect, LSA(SID_AGCMessage), AGCMessageID, FF_NONE|AF_TRANSPARENT|TJ_CENTER);
	pAGCMessage->SetColor(PCI_NTEXT, RED);
	Add(pAGCMessage);

	/* WB End Construction */

	Id(GENAGC_MESSAGE_ID);	
}
开发者ID:garyqinyu,项目名称:abv,代码行数:20,代码来源:agcmsg.cpp

示例12: GetMinSize

/*--------------------------------------------------------------------------*/
PegRect PegMenu::GetMinSize(void)
{
    PegRect SizeRect;
    PegRect CurrentSize;
    SizeRect.Set(0, 0, 0, 0);

    PegMenuButton *pButton = (PegMenuButton *) First();

    while(pButton)
    {
        CurrentSize = pButton->GetMinSize(TYPE_MENU);
        if (CurrentSize.Width() > SizeRect.Width())
        {
            SizeRect.wRight += CurrentSize.Width() - SizeRect.Width();
        }
        SizeRect.wBottom += CurrentSize.Height();
        pButton = (PegMenuButton *) pButton->Next();
    }
    SizeRect.wBottom += 6;
    SizeRect.wRight += 6;
    return SizeRect;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:23,代码来源:pmenu.cpp

示例13: PegWindow

/*--------------------------------------------------------------------------*/
PictureMenu::PictureMenu(SIGNED iLeft, SIGNED iTop) : 
    PegWindow(FF_NONE)
{
    PegRect ChildRect;

	mReal.Set(iLeft, iTop, iLeft + 49, iTop + 299);
    InitClient();
    AddStatus(PSF_MOVEABLE|PSF_SIZEABLE);

    ChildRect.Set(iLeft + 0, iTop + 250, iLeft + 49, iTop + 299);
    m_pPictureMenuButtonColorTemp = new TVBitmapButton(ChildRect, &gbcolortempBitmap, ID_PictureMenu_Button_ColorTemp);
    Add(m_pPictureMenuButtonColorTemp);

    ChildRect.Set(iLeft + 0, iTop + 200, iLeft + 49, iTop + 249);
    m_pPictureMenuButtonColor = new TVBitmapButton(ChildRect, &gbreducenoiseBitmap, ID_PictureMenu_Button_Color);
    Add(m_pPictureMenuButtonColor);

    ChildRect.Set(iLeft + 0, iTop + 150, iLeft + 49, iTop + 199);
    m_pPictureMenuButtonSharp = new TVBitmapButton(ChildRect, &gbsharpnessBitmap, ID_PictureMenu_Button_Sharp);
    Add(m_pPictureMenuButtonSharp);

    ChildRect.Set(iLeft + 0, iTop + 100, iLeft + 49, iTop + 149);
    m_pPictureMenuButtonTint = new TVBitmapButton(ChildRect, &gbcolorBitmap, ID_PictureMenu_Button_Tint);
    Add(m_pPictureMenuButtonTint);

    ChildRect.Set(iLeft + 0, iTop + 50, iLeft + 49, iTop + 99);
    m_pPictureMenuButtonContrast = new TVBitmapButton(ChildRect, &gbcontrastBitmap, ID_PictureMenu_Button_Contrast);
    Add(m_pPictureMenuButtonContrast);

    ChildRect.Set(iLeft + 0, iTop + 0, iLeft + 49, iTop + 49);
    m_pPictuerMenuButtonBright = new TVBitmapButton(ChildRect, &gbbrightnessBitmap, ID_PictureMenu_Button_Brightness);
    Add(m_pPictuerMenuButtonBright);

    /* WB End Construction */
	m_pPictureMenuButtonColorTemp->SetTipString(LS(SID_PictureMenu_Prompt_ColorTemp));
	m_pPictureMenuButtonColor->SetTipString(LS(SID_PictureMenu_Prompt_Color));
    m_pPictureMenuButtonSharp->SetTipString(LS(SID_PictureMenu_Prompt_Sharpness)); 
	m_pPictureMenuButtonTint->SetTipString(LS(SID_PictureMenu_Prompt_Tint));
	m_pPictureMenuButtonContrast->SetTipString(LS(SID_PictureMenu_Prompt_Contrast));
	m_pPictuerMenuButtonBright->SetTipString(LS(SID_PictureMenu_Prompt_Brightness));
	m_pToolTip = NULL;
	m_nCurrentSubWndID = ID_PictureMenu_Button_Brightness;
	Id(PICTURE_MENU_ID);

}
开发者ID:garyqinyu,项目名称:abv,代码行数:46,代码来源:picturemenu.cpp

示例14: main

int main(int, char **)
{
    // create the screen interface object:
    PegScreen *pScreen = CreatePegScreen();
    PegThing::SetScreenPtr(pScreen);
    
    // create the PEG message Queue:
    
    PegMessageQueue *pMsgQueue = new PegMessageQueue();
    PegThing::SetMessageQueuePtr(pMsgQueue);
    
    // create the screen manager:
    
    PegRect Rect;
    Rect.Set(0, 0, pScreen->GetXRes() - 1, pScreen->GetYRes() - 1);
    PegPresentationManager *pPresentation = new PegPresentationManager(Rect);
    PegThing::SetPresentationManagerPtr(pPresentation);
    pScreen->GenerateViewportList(pPresentation);

    PegAppInitialize(pPresentation);    
    pPresentation->Execute();

    // restore the timer interrupt:

    /*
    outp(0x43, 0x36);
    outp(0x40,0xff);
    outp(0x40,0xff);
    */

    delete pPresentation;
    delete pMsgQueue;
    delete pScreen;

    return 0;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:36,代码来源:dospeg.cpp

示例15: PegDecoratedWindow

/*----------------------------------------------------------------------------*/
ExampleTwo::ExampleTwo(SIGNED iLeft, SIGNED iTop) : PegDecoratedWindow()
{
    static PegMenuDescription HelpMenu [] = {
    {"Index",  ExampleTwo::IDB_HELPINDEX,  AF_ENABLED|BF_CHECKABLE, NULL},
    {"About",  ExampleTwo::IDB_ABOUT,  AF_ENABLED, NULL},
    {"", 0, 0, NULL}
    };
    static PegMenuDescription FileMenu [] = {
    {"Close",  ExampleTwo::IDB_CLOSE,  AF_ENABLED, NULL},
    {"Command",  0,  BF_SEPERATOR, NULL},
    {"Save",  ExampleTwo::IDB_FILESAVE,  AF_ENABLED, NULL},
    {"Open",  ExampleTwo::IDB_OPENFILE,  AF_ENABLED, NULL},
    {"", 0, 0, NULL}
    };
    static PegMenuDescription TopMenu [] = {
    {"Help",  0,  AF_ENABLED, HelpMenu},
    {"File",  0,  AF_ENABLED, FileMenu},
    {"", 0, 0, NULL}
    };
    PegRect ChildRect;
    PegThing *pChild1;

    mReal.Set(111, 93, 462, 369);
    InitClient();
    SetColor(PCI_NORMAL, CYAN);
    Add (new PegTitle("Example Two", TF_CLOSEBUTTON));
    Add(new PegMenuBar(TopMenu));

    ChildRect.Set(282, 145, 311, 164);
    Add(new PegPrompt(ChildRect, "/sec"));
    ChildRect.Set(222, 145, 275, 164);
    mpRatePrompt = new PegPrompt(ChildRect, "500", IDP_RATEVAL, FF_RECESSED|TJ_RIGHT|TT_COPY);
    mpRatePrompt->SetColor(PCI_NORMAL, BLACK);
    mpRatePrompt->SetColor(PCI_NTEXT, LIGHTGREEN);
    Add(mpRatePrompt);

    ChildRect.Set(127, 145, 212, 164);
    pChild1 = new PegPrompt(ChildRect, "Sample Rate");
    pChild1->SetColor(PCI_NORMAL, DARKGRAY);
    Add(pChild1);

    ChildRect.Set(126, 179, 312, 205);
    pChild1 = new PegSlider(ChildRect, 100, 1000, IDSL_RATE, FF_RECESSED, 50);
    ((PegSlider *) pChild1)->SetCurrentValue(500);
    Add(pChild1);

    ChildRect.Set(334, 260, 449, 354);
    pChild1 = new PegGroup(ChildRect, "TimeStamp");
    ChildRect.Set(346, 326, 412, 345);
    pChild1->Add(new PegRadioButton(ChildRect, "Daily", IDRB_DAILY));
    ChildRect.Set(346, 303, 408, 322);
    pChild1->Add(new PegRadioButton(ChildRect, "Hourly", IDRB_HOURLY));
    ChildRect.Set(346, 280, 411, 299);
    pChild1->Add(new PegRadioButton(ChildRect, "Minute", IDRB_MINUTE, FF_RAISED|AF_ENABLED|BF_SELECTED));
    Add(pChild1);

    ChildRect.Set(347, 233, 436, 252);
    pChild1 = new PegCheckBox(ChildRect, "All Data", IDRB_ALLDATA, FF_RAISED|AF_ENABLED|BF_SELECTED);
    pChild1->SetColor(PCI_NORMAL, WHITE);
    pChild1->SetColor(PCI_NTEXT, WHITE);
    Add(pChild1);

    ChildRect.Set(352, 188, 431, 214);
    pChild1 = new PegTextButton(ChildRect, "Stop", IDB_STOPBUTTON);
    pChild1->SetColor(PCI_NORMAL, LIGHTRED);
    Add(pChild1);

    ChildRect.Set(352, 150, 431, 176);
    pChild1 = new PegTextButton(ChildRect, "Start", IDB_STARTBUTTON);
    pChild1->SetColor(PCI_NORMAL, LIGHTGREEN);
    Add(pChild1);

    ChildRect.Set(128, 223, 314, 354);
    pChild1 = new PegWindow(ChildRect, FF_RECESSED);;
    pChild1->SetColor(PCI_NORMAL, BLACK);
    ((PegWindow *) pChild1)->SetScrollMode(WSM_HSCROLL);
    Add(pChild1);

}
开发者ID:garyqinyu,项目名称:abv,代码行数:80,代码来源:Exam2.cpp


注:本文中的PegRect::Set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。