示例#1
0
文件: main.cpp 项目: garyqinyu/abv
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));
}
示例#2
0
PegScreen *CreatePegScreen(void)
{
    PegRect Rect;
    Rect.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    PegScreen *pScreen = new SED1375Screen8(Rect);
    return pScreen;
}
示例#3
0
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;
}
示例#4
0
文件: main.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
LightWindow::LightWindow(const PegRect& Rect) :
    PegDecoratedWindow(Rect)
{
    Add(new PegTitle("PegBitmapLight Demo Window"));

    muColors[PCI_NORMAL] = GREEN;
    
    mpLight1 = new PegBitmapLight(mClient.wLeft + 20, mClient.wTop + 20, 3);
    mpLight1->SetStateBitmap(2, &gbredltBitmap);
    mpLight1->SetStateBitmap(1, &gbyellowltBitmap);
    mpLight1->SetStateBitmap(0, &gbgreenltBitmap);
    Add(mpLight1); 
    
    PegRect tRect;
    tRect.Set(mClient.wLeft + 200, mClient.wTop + 40, 
              mClient.wLeft + 300, mClient.wTop + 80);
    mpStart = new PegTextButton(tRect, "Start the Light", IDB_START);
    Add(mpStart);

    tRect.Shift(0, 50);
    mpStop = new PegTextButton(tRect, "Stop the Light", IDB_STOP);
    Add(mpStop);


}
示例#5
0
/*--------------------------------------------------------------------------*/
PegScreen *CreatePegScreen(void)
{
    PegRect Rect;
    Rect.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    PegScreen *pScreen = new Permedia2Screen(Rect);
    return pScreen;
}
示例#6
0
文件: main.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager* pPresentation)
{    
    PegRect Rect;
    Rect.Set(20, 20, 350, 350);
    ScaleWindow* pWindow = new ScaleWindow(Rect);
    pPresentation->Center(pWindow);
    pPresentation->Add(pWindow);
}
示例#7
0
/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager *pPresent)
{
    PegRect WinRect;
    WinRect.Set(0, 0, 400, 300);
    TabWindow *pTab = new TabWindow(WinRect);
//    pPresent->Center(pTab);
    pPresent->Add(pTab);
}
示例#8
0
文件: main.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager* pPresentation)
{
    PegRect Rect;
    Rect.Set(20, 20, 400, 240);
    LightWindow* pWindow = new LightWindow(Rect);

    pPresentation->Add(pWindow);
}
示例#9
0
文件: main.cpp 项目: Cartix/8Pool
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);
}
示例#10
0
文件: main.cpp 项目: garyqinyu/abv
void PegAppInitialize(PegPresentationManager* pPresentation)
{
    //pPresentation->SetWallpaper(&gbAbFluidBitmap);

    PegRect Rect;
    Rect.Set(20, 20, 550, 280);
    DialWindow* pWindow = new DialWindow(Rect);
    pPresentation->Add(pWindow);
}
示例#11
0
/*--------------------------------------------------------------------------*/
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);
}
示例#12
0
文件: dialog.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
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);
}
示例#13
0
/*--------------------------------------------------------------------------*/
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);
    }
}
示例#14
0
文件: main.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
ScaleWindow::ScaleWindow(const PegRect& Rect) :
    PegDecoratedWindow(Rect)
{
    Id(100);

    Add(new PegTitle("PegLinearScale Example"));

    PegRect WinRect;    
    WinRect.Set(50, 50, 100, 200);
    mpScale1 = new PegLinearScale(WinRect, 0, 100, 10, AF_TRANSPARENT | SS_STANDARDSTYLE);
    mlScale1Val = 0;
    miScale1Dir = -1;

    WinRect.Set(110, 50, 200, 200);
    mpScale2 = new PegLinearScale(WinRect, 0, 100, 10, FF_THIN | SS_STANDARDSTYLE);
    mpScale2->Style(mpScale2->Style() & ~SS_FACELEFT);

   #if PEG_NUM_COLORS >= 16
    mpScale2->SetNeedleColor(BLUE);
   #endif

    WinRect.Set(210, 50, 280, 300);
    mpScale3 = new PegLinearScale(WinRect, 0, 100, 10, FF_THIN | SS_STANDARDSTYLE);
    mpScale3->SetNeedleColor(CYAN);
    mpScale3->Style(mpScale3->Style() & ~SS_BOTTOMTOTOP);
    
    WinRect.Set(290, 50, 320, 310);
    mpScale4 = new PegLinearScale(WinRect, -100, 100, 10);
    mpScale4->Style(mpScale4->Style() & ~SS_FACELEFT);
    mpScale4->SetValue(0);
   #if PEG_NUM_COLORS >= 16
    mpScale4->SetNeedleColor(YELLOW);
   #endif

    WinRect.Set(50, 210, 200, 260);
    mpScale5 = new PegLinearScale(WinRect, 0, 100, 10);
    mpScale5->Style(mpScale5->Style() & ~SS_ORIENTVERT);
   #if PEG_NUM_COLORS >= 16
    mpScale5->SetNeedleColor(GREEN);
   #endif
    
    WinRect.Set(50, 270, 200, 320);
    mpScale6 = new PegLinearScale(WinRect, 0, 100, 5, FF_THIN | SS_STANDARDSTYLE);
    mpScale6->Style(mpScale6->Style() & ~SS_ORIENTVERT);
    mpScale6->Style(mpScale6->Style() & ~SS_FACELEFT);
    mpScale6->Style(mpScale6->Style() & ~SS_BOTTOMTOTOP);
   #if PEG_NUM_COLORS >= 16
    mpScale6->SetNeedleColor(MAGENTA);
   #endif

    Add(mpScale1);
    Add(mpScale2);
    Add(mpScale3);
    Add(mpScale4);
    Add(mpScale5);
    Add(mpScale6);
}
示例#15
0
文件: agcmsg.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
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);	
}
示例#16
0
文件: pmenu.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
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;
}
示例#17
0
/*--------------------------------------------------------------------------*/
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);

}
示例#18
0
文件: dospeg.cpp 项目: garyqinyu/abv
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;
}
示例#19
0
文件: Exam2.cpp 项目: garyqinyu/abv
/*----------------------------------------------------------------------------*/
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);

}
示例#20
0
文件: decbtn.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager* pPresent)
{
	PegRect Rect;
	Rect.Set(10, 10, 630, 370);
	PegDecoratedWindow* pWindow = new PegDecoratedWindow(Rect);

	pWindow->Add(new PegTitle("PegDecoratedButton Example"));

	PegToolBar* pToolBar = new PegToolBar();
	pWindow->Add(pToolBar);

	pWindow->SetColor(PCI_NORMAL, BROWN);

	Rect = pWindow->mClient;
	Rect.wLeft += (pWindow->mClient.Width() >> 4);
	Rect.wTop += (pWindow->mClient.Height() >> 4);
	Rect.wRight = Rect.wLeft + 150;
	Rect.wBottom = Rect.wTop + 50;
	PegDecoratedButton* pButton = new PegDecoratedButton(Rect, "Text Only", NULL);
	pWindow->Add(pButton);

	Rect.Shift(175, 0);
	pButton = new PegDecoratedButton(Rect, NULL, &gbRedDotBitmap);
	pWindow->Add(pButton);

	Rect.Shift(175, 0);
	pButton = new PegDecoratedButton(Rect, "Text and Bitmap", &gbRedDotBitmap);
	pWindow->Add(pButton);

	Rect.Shift(-175, 75);
	pButton = new PegDecoratedButton(Rect, "Text on the Bottom", &gbGreenDotBitmap,
									 0, AF_ENABLED, DBF_ORIENT_TR, TRUE);
	pWindow->Add(pButton);

	Rect.Shift(-150, 50);
	pButton = new PegDecoratedButton(Rect, "Text on the Right", &gbGreenDotBitmap,
									 0, AF_ENABLED, 0, TRUE);
	pWindow->Add(pButton);

	Rect.Shift(150, 50);
	pButton = new PegDecoratedButton(Rect, "Text on the Top", &gbGreenDotBitmap,
									 0, AF_ENABLED, DBF_ORIENT_BR, TRUE);
	pWindow->Add(pButton);

	Rect.Shift(150, -50);
	pButton = new PegDecoratedButton(Rect, "Text on the Left", &gbGreenDotBitmap,
									 0, AF_ENABLED, DBF_ORIENT_TR | DBF_ORIENT_BR,
									 TRUE);
	pWindow->Add(pButton);

	// Now add some buttons to a toolbar panel. we'll just
	// let them size themselves and have the panel put them
	// where it wants them
	PegToolBarPanel* pPanel = new PegToolBarPanel();
	pButton = new PegDecoratedButton(0, 0, "Stop", &gbStopBitmap, 0, AF_ENABLED,
									 0, TRUE);
	pPanel->Add(pButton);

	pButton = new PegDecoratedButton(0, 0, "Refresh", &gbRefreshBitmap, 0, AF_ENABLED,
								     0, TRUE);
	pPanel->Add(pButton);

	pButton = new PegDecoratedButton(0, 0, "New", &gbNewBitmap, 0, AF_ENABLED,
								     0, TRUE);
	pPanel->Add(pButton);

	pToolBar->AddPanel(pPanel);

	// Center the window and add it to the presentation manager
	pPresent->Center(pWindow);
	pPresent->Add(pWindow);
}
示例#21
0
文件: help.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
HelpMenuClass::HelpMenuClass(SIGNED iLeft, SIGNED iTop) : 
    PegBitmapWindow(NULL, kAutoAdjustBitmapSize, WHITE, FF_RAISED) 
{
    PegRect ChildRect;

    mReal.Set(iLeft, iTop, iLeft + 339, iTop + 334);
    InitClient();
    RemoveStatus(PSF_MOVEABLE|PSF_SIZEABLE);

    ChildRect.Set(iLeft + 2, iTop + 223, iLeft + 123, iTop + 239);
    pCancelStatus = new PegPrompt(ChildRect, LS(SID_Cancel), CancelStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pCancelStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pCancelStatus);

    ChildRect.Set(iLeft + 2, iTop + 204, iLeft + 123, iTop + 220);
    pMixStatus = new PegPrompt(ChildRect, LS(SID_Mix), MixStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pMixStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pMixStatus);

    ChildRect.Set(iLeft + 2, iTop + 186, iLeft + 123, iTop + 202);
    pRevealStatus = new PegPrompt(ChildRect, LS(SID_Reveal), RevealStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pRevealStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pRevealStatus);

    ChildRect.Set(iLeft + 218, iTop + 191, iLeft + 339, iTop + 207);
    pSubtitleStatus = new PegPrompt(ChildRect, LS(SID_Subtitle), SubtitleStatusID);
    pSubtitleStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pSubtitleStatus);

    ChildRect.Set(iLeft + 6, iTop + 43, iLeft + 125, iTop + 59);
    pColorLinksStatus = new PegPrompt(ChildRect, LS(SID_ColorLinks), ColorLinksStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pColorLinksStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pColorLinksStatus);

    ChildRect.Set(iLeft + 217, iTop + 57, iLeft + 338, iTop + 73);
    pTxtZoomStatus = new PegPrompt(ChildRect, LS(SID_TxtZoom), TxtZoomStatusID);
    pTxtZoomStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pTxtZoomStatus);

    ChildRect.Set(iLeft + 217, iTop + 205, iLeft + 338, iTop + 221);
    pTwbStatus = new PegPrompt(ChildRect, LS(SID_Teleweb), TwbStatusID);
    pTwbStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pTwbStatus);

    ChildRect.Set(iLeft + 217, iTop + 181, iLeft + 338, iTop + 197);
    pAVToogleStatus = new PegPrompt(ChildRect, LS(SID_AVToggle), AVToggleStatusID);
    pAVToogleStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pAVToogleStatus);

    ChildRect.Set(iLeft + 217, iTop + 163, iLeft + 338, iTop + 179);
    pZoomSubcodeStatus = new PegPrompt(ChildRect, LS(SID_ZoomMode), ZoomStatusID);
    pZoomSubcodeStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pZoomSubcodeStatus);

    ChildRect.Set(iLeft + 217, iTop + 72, iLeft + 338, iTop + 88);
    pTeletextStatus = new PegPrompt(ChildRect, LS(SID_TeletextOnOff), TeletextStatusID);
    pTeletextStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pTeletextStatus);

    ChildRect.Set(iLeft + 217, iTop + 114, iLeft + 338, iTop + 130);
    pPrgPPrgMStatus = new PegPrompt(ChildRect, LS(SID_PrgPlusMinus), PrgPPrgMStatusID);
    pPrgPPrgMStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pPrgPPrgMStatus);

    ChildRect.Set(iLeft + 217, iTop + 85, iLeft + 338, iTop + 101);
    pOKStatus = new PegPrompt(ChildRect, LS(SID_OK), OKStatusID);
    pOKStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pOKStatus);

    ChildRect.Set(iLeft + 217, iTop + 42, iLeft + 338, iTop + 58);
    pStandbyIndexStatus = new PegPrompt(ChildRect, LS(SID_Standby), StandbyIndexStatusID);
    pStandbyIndexStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pStandbyIndexStatus);

    ChildRect.Set(iLeft + 2, iTop + 144, iLeft + 123, iTop + 160);
    pDigitStatus = new PegPrompt(ChildRect, LS(SID_Digit), DigitStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pDigitStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pDigitStatus);

    ChildRect.Set(iLeft + 2, iTop + 116, iLeft + 123, iTop + 132);
    pSoundStatus = new PegPrompt(ChildRect, LS(SID_SoundPlusMinusMute), SoundStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pSoundStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pSoundStatus);

    ChildRect.Set(iLeft + 6, iTop + 97, iLeft + 125, iTop + 113);
    pLeftRightStatus = new PegPrompt(ChildRect, LS(SID_LeftRight), LeftRightStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pLeftRightStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pLeftRightStatus);

    ChildRect.Set(iLeft + 6, iTop + 81, iLeft + 125, iTop + 97);
    pMenuStatus = new PegPrompt(ChildRect, LS(SID_Menu), MenuStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pMenuStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pMenuStatus);

    ChildRect.Set(iLeft + 6, iTop + 65, iLeft + 125, iTop + 81);
    pUpDownStatus = new PegPrompt(ChildRect, LS(SID_UpDown), UpDownStatusID, FF_NONE|AF_TRANSPARENT|TJ_RIGHT);
    pUpDownStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pUpDownStatus);

    ChildRect.Set(iLeft + 155, iTop + 294, iLeft + 280, iTop + 321);
    pHelpStatus = new PegPrompt(ChildRect, LS(SID_General), HelpStatusID, FF_NONE|AF_TRANSPARENT|TJ_CENTER);
    pHelpStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pHelpStatus);

    ChildRect.Set(iLeft + 290, iTop + 297, iLeft + 317, iTop + 319);
    pRightBitmap = new PegIcon(ChildRect, &gbRighiconBitmap);
		pRightBitmap->RemoveStatus(PSF_ACCEPTS_FOCUS);
		Add(pRightBitmap);

    ChildRect.Set(iLeft + 17, iTop + 298, iLeft + 44, iTop + 320);
    pLeftBitmap = new PegIcon(ChildRect, &gbLefticonBitmap);
		pLeftBitmap->RemoveStatus(PSF_ACCEPTS_FOCUS);
		Add(pLeftBitmap);

    ChildRect.Set(iLeft + 50, iTop + 294, iLeft + 149, iTop + 321);
		pHelpSelectionButton = new TVDecoratedButton(ChildRect, LS(SID_HelpMenuWindowTitle), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, HelpSelectionButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pHelpSelectionButton->SetColor(PCI_NORMAL, 223);
    pHelpSelectionButton->SetColor(PCI_NTEXT, BLUE);
    pHelpSelectionButton->AddStatus(PSF_ACCEPTS_FOCUS);
    Add(pHelpSelectionButton);

    ChildRect.Set(iLeft + 131, iTop + 32, iLeft + 213, iTop + 264);
		pRCBitmap = new PegIcon(ChildRect, &gbRC_menBitmap);
		pRCBitmap->RemoveStatus(PSF_ACCEPTS_FOCUS);
		Add(pRCBitmap);
 
		/* WB End Construction */

		Id(HELP_MENU_ID);

		pCancelStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pMixStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pRevealStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pSubtitleStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pColorLinksStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pTxtZoomStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pTwbStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pAVToogleStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pZoomSubcodeStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pTeletextStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pPrgPPrgMStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pOKStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pStandbyIndexStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pDigitStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pSoundStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pLeftRightStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pMenuStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pUpDownStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);
    pHelpStatus->RemoveStatus(PSF_ACCEPTS_FOCUS);

		if (gbCurrentLanguage == 1) /* language = chinese */
		{
				pCancelStatus->SetFont(&A12RFont);
        pMixStatus->SetFont(&A12RFont);
        pRevealStatus->SetFont(&A12RFont);
        pSubtitleStatus->SetFont(&A12RFont);
        pColorLinksStatus->SetFont(&A12RFont);
        pTxtZoomStatus->SetFont(&A12RFont);
        pTwbStatus->SetFont(&A12RFont);
        pAVToogleStatus->SetFont(&A12RFont);
        pZoomSubcodeStatus->SetFont(&A12RFont);
        pTeletextStatus->SetFont(&A12RFont);
        pPrgPPrgMStatus->SetFont(&A12RFont);
        pOKStatus->SetFont(&A12RFont);
        pStandbyIndexStatus->SetFont(&A12RFont);
        pDigitStatus->SetFont(&A12RFont);
        pSoundStatus->SetFont(&A12RFont);
        pLeftRightStatus->SetFont(&A12RFont);
        pMenuStatus->SetFont(&A12RFont);
        pUpDownStatus->SetFont(&A12RFont);
        pHelpStatus->SetFont(&A12RFont);
				pHelpSelectionButton->SetFont(&A12RFont);
		}
		else if (gbCurrentLanguage == 2)  /* language = korean */
		{
				pCancelStatus->SetFont(&korean);
        pMixStatus->SetFont(&korean);
        pRevealStatus->SetFont(&korean);
        pSubtitleStatus->SetFont(&korean);
        pColorLinksStatus->SetFont(&korean);
        pTxtZoomStatus->SetFont(&korean);
        pTwbStatus->SetFont(&korean);
        pAVToogleStatus->SetFont(&korean);
        pZoomSubcodeStatus->SetFont(&korean);
        pTeletextStatus->SetFont(&korean);
        pPrgPPrgMStatus->SetFont(&korean);
        pOKStatus->SetFont(&korean);
        pStandbyIndexStatus->SetFont(&korean);
        pDigitStatus->SetFont(&korean);
        pSoundStatus->SetFont(&korean);
        pLeftRightStatus->SetFont(&korean);
        pMenuStatus->SetFont(&korean);
        pUpDownStatus->SetFont(&korean);
        pHelpStatus->SetFont(&korean);
				pHelpSelectionButton->SetFont(&korean);
		}
		else /* default for English & French */
		{
				pCancelStatus->SetFont(&Pronto_10);
        pMixStatus->SetFont(&Pronto_10);
        pRevealStatus->SetFont(&Pronto_10);
        pSubtitleStatus->SetFont(&Pronto_10);
        pColorLinksStatus->SetFont(&Pronto_10);
        pTxtZoomStatus->SetFont(&Pronto_10);
        pTwbStatus->SetFont(&Pronto_10);
        pAVToogleStatus->SetFont(&Pronto_10);
        pZoomSubcodeStatus->SetFont(&Pronto_10);
        pTeletextStatus->SetFont(&Pronto_10);
        pPrgPPrgMStatus->SetFont(&Pronto_10);
        pOKStatus->SetFont(&Pronto_10);
        pStandbyIndexStatus->SetFont(&Pronto_10);
        pDigitStatus->SetFont(&Pronto_10);
        pSoundStatus->SetFont(&Pronto_10);
        pLeftRightStatus->SetFont(&Pronto_10);
        pMenuStatus->SetFont(&Pronto_10);
        pUpDownStatus->SetFont(&Pronto_10);
        pHelpStatus->SetFont(&Pronto_10);
				pHelpSelectionButton->SetFont(&Pronto_10);
		}
		
		DisplayHelp(); /* setup help window */

}
示例#22
0
文件: keypad.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
KeyboardWin::KeyboardWin() : PegDialog()
{
    PegRect ChildRect;

    mReal.Set(0, 0, 319, 239);
    InitClient();
    Add (new PegTitle("Enter Value", TF_CLOSEBUTTON));

    ChildRect.Set(205, 210, 284, 231);
    Add(new KeypadButton(ChildRect, "Cancel", IDB_CANCEL, AF_ENABLED));
    ChildRect.Set(121, 210, 200, 231);
    Add(new KeypadButton(ChildRect, "Clear", IDB_CLEAR, AF_ENABLED));
    ChildRect.Set(37, 210, 116, 231);
    Add(new KeypadButton(ChildRect, "OK", IDB_OK, AF_ENABLED));
    ChildRect.Set(33, 178, 81, 199);
    Add(new KeypadButton(ChildRect, "Shift", IDB_SHIFT));

    ChildRect.Set(85, 178, 236, 199);
    mpSpaceKey = new KeypadButton(ChildRect, " ", IDB_LETTER);
    Add(mpSpaceKey);

    ChildRect.Set(241, 178, 289, 199);
    Add(new KeypadButton(ChildRect, "BS", IDB_BACK));

    ChildRect.Set(33, 29, 286, 48);
//    mpValue = new PegPrompt(ChildRect, "_", IDP_VALUE, FF_RECESSED|TJ_LEFT|TT_COPY);
//    Add(mpValue);
    
    mpValue = new PegString(ChildRect, NULL, IDP_VALUE, FF_RECESSED|TJ_LEFT|TT_COPY|EF_EDIT);
//    Add(mpValue);

    ChildRect.Set(292, 61, 313, 82);
    Add(new KeypadButton(ChildRect, "+", IDB_LETTER));
    ChildRect.Set(266, 61, 287, 82);
    Add(new KeypadButton(ChildRect, "_", IDB_LETTER));
    ChildRect.Set(240, 61, 261, 82);
    Add(new KeypadButton(ChildRect, ")", IDB_LETTER));
    ChildRect.Set(214, 61, 235, 82);
    Add(new KeypadButton(ChildRect, "(", IDB_LETTER));
    ChildRect.Set(188, 61, 209, 82);
    Add(new KeypadButton(ChildRect, "*", IDB_LETTER));
    ChildRect.Set(162, 61, 183, 82);
    Add(new KeypadButton(ChildRect, "&", IDB_LETTER));
    ChildRect.Set(136, 61, 157, 82);
    Add(new KeypadButton(ChildRect, "^", IDB_LETTER));
    ChildRect.Set(110, 61, 131, 82);
    Add(new KeypadButton(ChildRect, "%", IDB_LETTER));
    ChildRect.Set(84, 61, 105, 82);
    Add(new KeypadButton(ChildRect, "$", IDB_LETTER));
    ChildRect.Set(58, 61, 79, 82);
    Add(new KeypadButton(ChildRect, "#", IDB_LETTER));
    ChildRect.Set(32, 61, 53, 82);
    Add(new KeypadButton(ChildRect, "@", IDB_LETTER));

    ChildRect.Set(6, 61, 27, 82);
    mpOneKey = new KeypadButton(ChildRect, "!", IDB_LETTER);
    Add(mpOneKey);

    ChildRect.Set(267, 150, 288, 171);
    mpQuestionKey = new KeypadButton(ChildRect, "?", IDB_LETTER);
    Add(mpQuestionKey);

    ChildRect.Set(241, 150, 262, 171);
    Add(new KeypadButton(ChildRect, ">", IDB_LETTER));
    ChildRect.Set(215, 150, 236, 171);
    Add(new KeypadButton(ChildRect, "<", IDB_LETTER));
    ChildRect.Set(189, 150, 210, 171);
    Add(new KeypadButton(ChildRect, "M", IDB_LETTER));
    ChildRect.Set(163, 150, 184, 171);
    Add(new KeypadButton(ChildRect, "N", IDB_LETTER));
    ChildRect.Set(137, 150, 158, 171);
    Add(new KeypadButton(ChildRect, "B", IDB_LETTER));
    ChildRect.Set(111, 150, 132, 171);
    Add(new KeypadButton(ChildRect, "V", IDB_LETTER));
    ChildRect.Set(85, 150, 106, 171);
    Add(new KeypadButton(ChildRect, "C", IDB_LETTER));
    ChildRect.Set(59, 150, 80, 171);
    Add(new KeypadButton(ChildRect, "X", IDB_LETTER));

    ChildRect.Set(33, 150, 54, 171);
    mpZKey = new KeypadButton(ChildRect, "Z", IDB_LETTER);
    Add(mpZKey);

    ChildRect.Set(280, 122, 301, 143);
    Add(new KeypadButton(ChildRect, "\"", IDB_LETTER));
    ChildRect.Set(254, 122, 275, 143);
    Add(new KeypadButton(ChildRect, ":", IDB_LETTER));
    ChildRect.Set(228, 122, 249, 143);
    Add(new KeypadButton(ChildRect, "L", IDB_LETTER));
    ChildRect.Set(202, 122, 223, 143);
    Add(new KeypadButton(ChildRect, "K", IDB_LETTER));
    ChildRect.Set(176, 122, 197, 143);
    Add(new KeypadButton(ChildRect, "J", IDB_LETTER));
    ChildRect.Set(150, 122, 171, 143);
    Add(new KeypadButton(ChildRect, "H", IDB_LETTER));
    ChildRect.Set(124, 122, 145, 143);
    Add(new KeypadButton(ChildRect, "G", IDB_LETTER));
    ChildRect.Set(98, 122, 119, 143);
    Add(new KeypadButton(ChildRect, "F", IDB_LETTER));
    ChildRect.Set(72, 122, 93, 143);
    Add(new KeypadButton(ChildRect, "D", IDB_LETTER));
    ChildRect.Set(46, 122, 67, 143);
    Add(new KeypadButton(ChildRect, "S", IDB_LETTER));
    ChildRect.Set(20, 122, 41, 143);
    Add(new KeypadButton(ChildRect, "A", IDB_LETTER));
    ChildRect.Set(292, 94, 313, 115);
    Add(new KeypadButton(ChildRect, "}", IDB_LETTER));
    ChildRect.Set(266, 94, 287, 115);
    Add(new KeypadButton(ChildRect, "{", IDB_LETTER));
    ChildRect.Set(240, 94, 261, 115);
    Add(new KeypadButton(ChildRect, "P", IDB_LETTER));
    ChildRect.Set(214, 94, 235, 115);
    Add(new KeypadButton(ChildRect, "O", IDB_LETTER));
    ChildRect.Set(188, 94, 209, 115);
    Add(new KeypadButton(ChildRect, "I", IDB_LETTER));
    ChildRect.Set(162, 94, 183, 115);
    Add(new KeypadButton(ChildRect, "U", IDB_LETTER));
    ChildRect.Set(136, 94, 157, 115);
    Add(new KeypadButton(ChildRect, "Y", IDB_LETTER));
    ChildRect.Set(110, 94, 131, 115);
    Add(new KeypadButton(ChildRect, "T", IDB_LETTER));
    ChildRect.Set(84, 94, 105, 115);
    Add(new KeypadButton(ChildRect, "R", IDB_LETTER));
    ChildRect.Set(58, 94, 79, 115);
    Add(new KeypadButton(ChildRect, "E", IDB_LETTER));
    ChildRect.Set(32, 94, 53, 115);
    Add(new KeypadButton(ChildRect, "W", IDB_LETTER));
    ChildRect.Set(6, 94, 27, 115);
    Add(new KeypadButton(ChildRect, "Q", IDB_LETTER));
    /* WB End Construction */

    mbCaps = TRUE;
    Add(mpValue);
}
示例#23
0
文件: setup.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
SetupMenuClass::SetupMenuClass(SIGNED iLeft, SIGNED iTop) : 
    PegBitmapWindow(&gbPictBitmap, kAutoAdjustBitmapSize, PegBlueTransparent, FF_RAISED) 
{
    PegRect ChildRect;

    mReal.Set(iLeft, iTop, iLeft + 313, iTop + 279);
    InitClient();
    RemoveStatus(PSF_MOVEABLE|PSF_SIZEABLE);
#if 0
    ChildRect.Set(iLeft + 245, iTop + 146, iLeft + 304, iTop + 173);
    pCRTTypeStatus = new PegPrompt(ChildRect, LS(SID_CRT43), CRTTypeStatusID);
    pCRTTypeStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pCRTTypeStatus);

    ChildRect.Set(iLeft + 245, iTop + 106, iLeft + 304, iTop + 133);
    pI2C3Status = new PegPrompt(ChildRect, LS(SID_ON), I2C3StatusID);
    pI2C3Status->SetColor(PCI_NTEXT, BLUE);
    Add(pI2C3Status);

    ChildRect.Set(iLeft + 245, iTop + 66, iLeft + 304, iTop + 93);
    pI2C0Status = new PegPrompt(ChildRect, LS(SID_ON), I2C0StatusID);
    pI2C0Status->SetColor(PCI_NTEXT, BLUE);
    Add(pI2C0Status);

    ChildRect.Set(iLeft + 245, iTop + 186, iLeft + 304, iTop + 213);
		pTranslucencyBar = new TVProgressBar(ChildRect, FF_RAISED|PS_LED|PS_SHOW_VAL, ucTranslucencyMin, ucTranslucencyMax, 32);
    Add(pTranslucencyBar);
#endif
    ChildRect.Set(iLeft + 13, iTop + 226, iLeft + 113, iTop + 253);
    pCancelbutton = new TVDecoratedButton(ChildRect, LS(SID_ChannelCancelButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, CancelButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pCancelbutton->SetColor(PCI_NORMAL, 223);
    pCancelbutton->SetColor(PCI_NTEXT, BLUE);
    Add(pCancelbutton);

    ChildRect.Set(iLeft + 13, iTop + 186, iLeft + 113, iTop + 213);
    pOKbutton = new TVDecoratedButton(ChildRect, LS(SID_ChannelOKButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, OKButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pOKbutton->SetColor(PCI_NORMAL, 223);
    pOKbutton->SetColor(PCI_NTEXT, BLUE);
    Add(pOKbutton);


    ChildRect.Set(iLeft + 123, iTop + 146, iLeft + 242, iTop + 173);
    LabelModulation = new PegPrompt(ChildRect, LS(SID_LabelModulation), LabelModulationID);
    LabelModulation->SetColor(PCI_NTEXT, BLUE);
    Add(LabelModulation);

    ChildRect.Set(iLeft + 123, iTop + 106, iLeft + 242, iTop + 133);
    LabelSymbolrate = new PegPrompt(ChildRect, LS(SID_LabelSymbolrate), LabelSymbolrateID);
    LabelSymbolrate->SetColor(PCI_NTEXT, BLUE);
    Add(LabelSymbolrate);

    ChildRect.Set(iLeft + 123, iTop + 66, iLeft + 242, iTop + 93);
    LabelFrequency = new PegPrompt(ChildRect, LS(SID_LabelFrequency), LabelFrequencyID);
    LabelFrequency->SetColor(PCI_NTEXT, BLUE);
    Add(LabelFrequency);


    ChildRect.Set(iLeft + 13, iTop + 146, iLeft + 113, iTop + 173);
    EditModulation = new MutilSelectString(ChildRect);
    Add(EditModulation);


    ChildRect.Set(iLeft + 13, iTop + 106, iLeft + 113, iTop + 133);
    EditSymbolrate = new stEditInput(ChildRect);
    Add(EditSymbolrate);

    ChildRect.Set(iLeft + 13, iTop + 66, iLeft + 113, iTop + 93);
    EditFrequency = new stEditInput(ChildRect);
    Add(EditFrequency);

/*    ChildRect.Set(iLeft + 20, iTop + 15, iLeft + 160, iTop + 44);
    pSetupMenuWindowTitle = new PegPrompt(ChildRect, LS(SID_SetupMenuWindowTitle), SetupMenuWindowTitleID, FF_NONE|AF_TRANSPARENT|TJ_CENTER);
    pSetupMenuWindowTitle->SetColor(PCI_NORMAL, 130);
    pSetupMenuWindowTitle->SetColor(PCI_NTEXT, BLUE);
    Add(pSetupMenuWindowTitle); */

    /* WB End Construction */
		Id(SETUP_MENU_ID);

	if (gbCurrentLanguage == 1) /* language = chinese */
	{
		LabelFrequency->SetFont(&chinesefont);
		LabelSymbolrate->SetFont(&chinesefont);
		LabelModulation->SetFont(&chinesefont);
		pOKbutton->SetFont(&chinesefont);
		pCancelbutton->SetFont(&chinesefont);
	}
	else if (gbCurrentLanguage == 0)
	{
		LabelFrequency->SetFont(&Pronto_12);
		LabelSymbolrate->SetFont(&Pronto_12);
		LabelModulation->SetFont(&Pronto_12);
		pOKbutton->SetFont(&Pronto_12);
		pCancelbutton->SetFont(&Pronto_12);
	}

		EditFrequency->SetFont(&Pronto_12);
		EditSymbolrate->SetFont(&Pronto_12);
		EditModulation->SetFont(&Pronto_12); 
#if 0
		if (gbCurrentLanguage == 1) /* language = chinese */
		{
	    pSetupMenuWindowTitle->SetFont(&A12RFont);
		}
		else if (gbCurrentLanguage == 2)  /* language = korean */
		{
	    pSetupMenuWindowTitle->SetFont(&korean);
		}
		else /* default for English & French */
		{
	    pSetupMenuWindowTitle->SetFont(&Pronto_16);
		}
#endif

		RefreshSetupWindow(); /* initialize window */
}
示例#24
0
void ScribbleWindow::Search()
{
    //CPString dataen[119]={"", "Hydrogen","Helium","Lithium","Beryllium","Bore","Carbon","Nitrogen","Oxygen","Fluorine","Neon","Sodium","Magnesium","Aluminum","Silicium","Phosphorus","Sulfur","Chlorine","Argon","Potassium","Calcium","Scandium","Titanium","Vanadium","Chromium","Manganese","Iron","Cobalt","Nickel","Copper","Zinc","Gallium","Germanium","Arsenic","Selenium","Bromine","Krypton","Rubidium","Strontium","Yttrium","Zirconium","Niobium","Molybdenum","Technetium","Ruthenium","Rhodium","Palladium","Silver","Cadmium","Indium","Tin","Antimony","Tellurium","Iodine","Xenon","Cesium","Barium","Lanthanum","Cerium","Praseodymium","Neodymium","Promethium","Samarium","Europium","Gadolinium","Terbium","Dysprosium","Holmium","Erbium","Thulium","Ytterbium","Lutetium","Hafnium","Tantalum","Tungsten","Rhenium","Osmium","Iridium","Platinum","Gold","Mercury","Thallium","Lead","Bismuth","Polonium","Astatine","Radon","Francium","Radium","Actinium","Thorium","Protactinium","Uranium","Neptunium","Plutonium","Americium","Curium","Berkelium","Californium","Einsteinium","Fermium","Mendelevium","Nobelium","Lawrencium","Rutherfordium","Dubnium","Seaborgium","Bohrium","Hassium","Meitnerium","Darmstadtium","Roentgenium","Ununbium","Ununtrium","Ununquadium","Ununpentium","Ununhexium","Ununseptium","Ununoctium"};
    //CPString datafr[119]={"", "Hydrogene","Helium","Lithium","Beryllium","Bore","Carbone","Azote","Oxygene","Fluor","Neon","Sodium","Magnesium","Aluminum","Silicium","Phosphore","Soufre","Chlore","Argon","Potassium","Calcium","Scandium","Titanium","Vanadium","Chrome","Manganese","Fer","Cobalt","Nickel","Cuivre","Zinc","Gallium","Germanium","Arsenic","Selenium","Brome","Krypton","Rubidium","Strontium","Yttrium","Zirconium","Niobium","Molybdenum","Technetium","Ruthenium","Rhodium","Palladium","Argent","Cadmium","Indium","ETain","Antimoine","Tellurium","Iode","Xenon","Cesium","Barium","Lanthanum","Cerium","Praseodymium","Neodymium","Promethium","Samarium","Europium","Gadolinium","Terbium","Dysprosium","Holmium","Erbium","Thulium","Ytterbium","Lutetium","Hafnium","Tantalum","Tungstene","Rhenium","Osmium","Iridium","Platine","Or","Mercure","Thallium","Lead","Bismuth","Polonium","Astatine","Radon","Francium","Radium","Actinium","Thorium","Protactinium","Uranium","Neptunium","Plutonium","Americium","Curium","Berkelium","Californium","Einsteinium","Fermium","Mendelevium","Nobelium","Lawrencium","Rutherfordium","Dubnium","Seaborgium","Bohrium","Hassium","Meitnerium","Darmstadtium","Roentgenium","Ununbium","Ununtrium","Ununquadium","Ununpentium","Ununhexium","Ununseptium","Ununoctium"};
    CPString data1[2][118]={{" H"," He"," Li"," Be"," B"," C"," N"," O"," F"," Ne"," Na"," Mg"," Al"," Si"," P"," S"," Cl"," Ar"," K"," Ca"," Sc"," Ti"," V"," Cr"," Mn"," Fe"," Co"," Ni"," Cu"," Zn"," Ga"," Ge"," As"," Se"," Br"," Kr"," Rb"," Sr"," Y"," Zr"," Nb"," Mo"," Tc"," Ru"," Rh"," Pd"," Ag"," Cd"," In"," Sn"," Sb"," Te"," I"," Xe"," Cs"," Ba"," La"," Ce"," Pr"," Nd"," Pm"," Sm"," Eu"," Gd"," Tb"," Dy"," Ho"," Er"," Tm"," Yb"," Lu"," Hf"," Ta"," W"," Re"," Os"," Ir"," Pt"," Au"," Hg"," Tl"," Pb"," Bi"," Po"," At"," Rn"," Fr"," Ra"," Ac"," Th"," Pa"," U"," Np"," Pu"," Am"," Cm"," Bk"," Cf"," Es"," Fm"," Md"," No"," Lr"," Rf"," Db"," Sg"," Bh"," Hs"," Mt"," Ds"," Rg"," Uub"," Uut"," Uuq"," Uup"," Uuh"," Uus"," Uuo"},{" 1"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9"," 10"," 11"," 12"," 13"," 14"," 15"," 16"," 17"," 18"," 19"," 20"," 21"," 22"," 23"," 24"," 25"," 26"," 27"," 28"," 29"," 30"," 31"," 32"," 33"," 34"," 35"," 36"," 37"," 38"," 39"," 40"," 41"," 42"," 43"," 44"," 45"," 46"," 47"," 48"," 49"," 50"," 51"," 52"," 53"," 54"," 55"," 56"," 57"," 58"," 59"," 60"," 61"," 62"," 63"," 64"," 65"," 66"," 67"," 68"," 69"," 70"," 71"," 72"," 73"," 74"," 75"," 76"," 77"," 78"," 79"," 80"," 81"," 82"," 83"," 84"," 85"," 86"," 87"," 88"," 89"," 90"," 91"," 92"," 93"," 94"," 95"," 96"," 97"," 98"," 99"," 100"," 101"," 102"," 103"," 104"," 105"," 106"," 107"," 108"," 109"," 110"," 111"," 112"," 113"," 114"," 115"," 116"," 117"," 118"}};
    PegRect r = {8,25,152,205};
    CPString title,title2,title3,title4,title5,title6,title7,title8;
    PegRect ListRect;
    ListRect.Set(20, 85, 100, 150);
    PegComboBox *pList = new PegComboBox(ListRect,ID_1);
    switch (GetCurrentLanguageInfo())
	{
		case CurrentLanguage_Fra :
			title="Recherche";
			title2="Type de recherche :";
			title3=" Recherche par nom";
			title4=" Recherche par symbole";
			title5=" Recherche par numero";
			title6="\xEE\x86 Nom";
			title7="\xEE\x86 Symbole";
			title8="\xEE\x86 Numero";
			for (int iLoop = 118; iLoop > 0; iLoop--)
            {
            pList->Add(new PegPrompt(0, 0, datafr[iLoop-1], iLoop,
            FF_NONE|TJ_LEFT|AF_ENABLED|TT_COPY));
            }
			break;
		case CurrentLanguage_Eng :
		default :
			title="Search for an element";
			title2="Information to use :";
			title3=" Search by name";
			title4=" Search by symbol";
			title5=" Search by number";
			title6="\xEE\x86 Name";
			title7="\xEE\x86 Symbol";
			title8="\xEE\x86 Number";
			for (int iLoop = 118; iLoop > 0; iLoop--)
            {
            pList->Add(new PegPrompt(0, 0, dataen[iLoop-1], iLoop,
            FF_NONE|TJ_LEFT|AF_ENABLED|TT_COPY));
            }
            break;
	}
    PegMessageWindow* cpd = new PegMessageWindow(r,title, NULL, MW_OK|MW_CANCEL|FF_RAISED, 0 , 0, 0);
    PegPrompt *pp = new PegPrompt(20, 41, title2);
    cpd->Add(pp);
    PegRadioButton *b1 = new PegRadioButton(10, 56, title3);
    cpd->Add(b1);
    pp = new PegPrompt(10, 71, title6);
    cpd->Add(pp);
    b1 = new PegRadioButton(10, 101, title4);
    cpd->Add(b1);
    pp = new PegPrompt(10, 116, title7);
    cpd->Add(pp);
    b1 = new PegRadioButton(10, 145, title5);
    cpd->Add(b1);
    pp = new PegPrompt(10, 162, title8);
    cpd->Add(pp);
    for(int i=1;i<4;i++)
    {
        pp = new PegPrompt(70, 45*i+26, ":");
        cpd->Add(pp);
    }
    PegString* xmin=new PegString(76, 70, 75,"",0,FF_NONE|AF_ENABLED|EF_EDIT);
    PegString* xmax=new PegString(76, 115, 25,"",0,FF_NONE|AF_ENABLED|EF_EDIT);
    PegString* xscale=new PegString(76, 161, 25,"0",0,FF_NONE|AF_ENABLED|EF_EDIT);
    cpd->Add(xmin);
    cpd->Add(xmax);
    cpd->Add(xscale);
    ListRect.Set(20, 130, 100, 195);
    PegComboBox *pList2 = new PegComboBox(ListRect,ID_2);
    for (int iLoop = 118; iLoop > 0; iLoop--)
    {
        pList2->Add(new PegPrompt(0, 0, data1[0][iLoop-1], iLoop+1, FF_NONE|TJ_LEFT|AF_ENABLED|TT_COPY));
    }
    pList2->Add(new PegPrompt(0, 0, "", 1, FF_NONE|TJ_LEFT|AF_ENABLED|TT_COPY));
    pList->SetScrollMode(WSM_VSCROLL);
    cpd->Add(pList);
    pList2->SetScrollMode(WSM_VSCROLL);
    cpd->Add(pList2);
    PegRect ChildRect;
    ChildRect.Set(101, 157, 111, 177);
    PegSpinButton *pSpin = new PegSpinButton(ChildRect,
    xscale, 0, 118, 1, SB_VERTICAL);
    cpd->Add(pSpin);
    if (cpd->Execute()==IDB_OK)
    {
    CPString nom=xmin->DataGet(),sym=xmax->DataGet(),num=xscale->DataGet();
    int i=1;
    CPMainFrame *mf = GetMainFrame();
    ScribbleDocument * sdoc = (ScribbleDocument *) GetDocument();
	ChildRect = mf->BottomAppRectangle();
    CounterWindow* cwin = new CounterWindow(ChildRect,this,sdoc,mf);
	OnCount();
    if (SIGNAL(ID_1, PSF_LIST_SELECT) && nom=="" && pList->GetSelectedIndex()!=0)
    {
        int elem = (int)pList->GetSelectedIndex();
        cwin->disp(elem);
    }
    else if (nom!="")
    {
            switch (GetCurrentLanguageInfo())
	{
		case CurrentLanguage_Fra :
			while (nom!=datafr[i] && i<119) i++;
			break;
		case CurrentLanguage_Eng :
		default :
			while (nom!=dataen[i] && i<119) i++;
            break;
	}
        if (i<119) cwin->disp(i);
    }    
    else if (SIGNAL(ID_2, PSF_LIST_SELECT) && sym=="" && pList2->GetSelectedIndex()!=0)
    {
        int elem = (int)pList2->GetSelectedIndex();
        cwin->disp(elem);
    }    
    
    else if (sym!="")
    {
        sym=" "+sym;
        while (sym!=data1[0][i-1] && i<119) i++;
        if (i<119) cwin->disp(i);
    }
    else if (num!="" && num!="0")
    {
        num=" "+num;
        while (num!=data1[1][i-1] && i<119) i++;
        if (i<119) cwin->disp(i);
    }
    sdoc->OnChangedData(this);
    }    
} 
示例#25
0
/*--------------------------------------------------------------------------*/
PicturePlusMenuClass::PicturePlusMenuClass(SIGNED iLeft, SIGNED iTop) : 
    PegBitmapWindow(&gbPictpBitmap, kAutoAdjustBitmapSize, 0, FF_NONE) 
{
    PegRect ChildRect;

    mReal.Set(iLeft, iTop, iLeft + 320, iTop + 375);
    InitClient();
    RemoveStatus(PSF_MOVEABLE|PSF_SIZEABLE);

    ChildRect.Set(iLeft + 205, iTop + 133, iLeft + 314, iTop + 157);
    pContrastEnhStatus = new PegPrompt(ChildRect, LS(SID_BWShrink), ContrastEnhStatusID);
    pContrastEnhStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pContrastEnhStatus);

    ChildRect.Set(iLeft + 205, iTop + 313, iLeft + 304, iTop + 337);
    pDigitalScanStatus = new PegPrompt(ChildRect, LS(SID_AUTO), DigitalScanStatusID);
    pDigitalScanStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pDigitalScanStatus);

	ChildRect.Set(iLeft + 205, iTop + 343, iLeft + 304, iTop + 367);
    pIfpLevelStatus = new PegPrompt(ChildRect, LS(SID_MED), IfpLevelStatusID);
    pIfpLevelStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pIfpLevelStatus);

    ChildRect.Set(iLeft + 205, iTop + 283, iLeft + 304, iTop + 307);
    pCTIStatus = new PegPrompt(ChildRect, LS(SID_OFF), CTIStatusID);
    pCTIStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pCTIStatus);

    ChildRect.Set(iLeft + 205, iTop + 253, iLeft + 304, iTop + 277);
    pNRStatus = new PegPrompt(ChildRect, LS(SID_AUTO), NRStatusID);
    pNRStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pNRStatus);

    ChildRect.Set(iLeft + 205, iTop + 193, iLeft + 304, iTop + 217);
    pChromaCoringStatus = new PegPrompt(ChildRect, LS(SID_OFF), ChromaCoringStatusID);
    pChromaCoringStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pChromaCoringStatus);

    ChildRect.Set(iLeft + 205, iTop + 163, iLeft + 304, iTop + 187);
    pCombFilterStatus = new PegPrompt(ChildRect, LS(SID_OFF), CombFilterStatusID);
    pCombFilterStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pCombFilterStatus);

    ChildRect.Set(iLeft + 205, iTop + 103, iLeft + 304, iTop + 127);
    pGreenBoostStatus = new PegPrompt(ChildRect, LS(SID_OFF), GreenBoostStatusID);
    pGreenBoostStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pGreenBoostStatus);

    ChildRect.Set(iLeft + 205, iTop + 73, iLeft + 304, iTop + 97);
    pAutoFleshStatus = new PegPrompt(ChildRect, LS(SID_OFF), AutoFleshStatusID);
    pAutoFleshStatus->SetColor(PCI_NTEXT, BLUE);
    Add(pAutoFleshStatus);

    ChildRect.Set(iLeft + 205, iTop + 38, iLeft + 304, iTop + 62);
    pTintBar = new TVProgressBar(ChildRect, FF_RAISED|PS_LED|PS_SHOW_VAL, ucTintMin, ucTintMax, 0);
    Add(pTintBar);

    ChildRect.Set(iLeft + 205, iTop + 223, iLeft + 304, iTop + 247);
    pRotationBar = new TVProgressBar(ChildRect, FF_RAISED|PS_LED|PS_SHOW_VAL, ucRotationMin, ucRotationMax, 0);
    Add(pRotationBar);

    ChildRect.Set(iLeft + 11, iTop + 343, iLeft + 200, iTop + 367);
    pIfPLevelButton = new TVDecoratedButton(ChildRect, LS(SID_IFPLevelID), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, IfpLevelButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pIfPLevelButton->SetColor(PCI_NORMAL, 223);
    pIfPLevelButton->SetColor(PCI_NTEXT, BLUE);
    Add(pIfPLevelButton);

    ChildRect.Set(iLeft + 11, iTop + 313, iLeft + 200, iTop + 337);
    pDigitalScanButton = new TVDecoratedButton(ChildRect, LS(SID_DigitalScanButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, DigitalScanButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pDigitalScanButton->SetColor(PCI_NORMAL, 223);
    pDigitalScanButton->SetColor(PCI_NTEXT, BLUE);
    Add(pDigitalScanButton);

    ChildRect.Set(iLeft + 11, iTop + 283, iLeft + 200, iTop + 307);
    pCTIButton = new TVDecoratedButton(ChildRect, LS(SID_CTIButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, CTIButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pCTIButton->SetColor(PCI_NORMAL, 223);
    pCTIButton->SetColor(PCI_NTEXT, BLUE);
    Add(pCTIButton);

    ChildRect.Set(iLeft + 11, iTop + 253, iLeft + 200, iTop + 277);
    pNRButton = new TVDecoratedButton(ChildRect, LS(SID_NRButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, NRButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pNRButton->SetColor(PCI_NORMAL, 223);
    pNRButton->SetColor(PCI_NTEXT, BLUE);
    Add(pNRButton);

    ChildRect.Set(iLeft + 11, iTop + 223, iLeft + 200, iTop + 247);
    pRotationButton = new TVDecoratedButton(ChildRect, LS(SID_RotationButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, RotationButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pRotationButton->SetColor(PCI_NORMAL, 223);
    pRotationButton->SetColor(PCI_NTEXT, BLUE);
    Add(pRotationButton);

    ChildRect.Set(iLeft + 11, iTop + 193, iLeft + 200, iTop + 217);
    pChromaCoringButton = new TVDecoratedButton(ChildRect, LS(SID_ChromaCoringButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, ChromaCoringButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pChromaCoringButton->SetColor(PCI_NORMAL, 223);
    pChromaCoringButton->SetColor(PCI_NTEXT, BLUE);
    Add(pChromaCoringButton);

    ChildRect.Set(iLeft + 11, iTop + 163, iLeft + 200, iTop + 187);
    pCombFilterButton = new TVDecoratedButton(ChildRect, LS(SID_CombFilterButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, CombFilterButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pCombFilterButton->SetColor(PCI_NORMAL, 223);
    pCombFilterButton->SetColor(PCI_NTEXT, BLUE);
    Add(pCombFilterButton);

    ChildRect.Set(iLeft + 11, iTop + 133, iLeft + 200, iTop + 157);
    pContrastEnhButton = new TVDecoratedButton(ChildRect, LS(SID_ContrastEnhButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, ContrastEnhButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pContrastEnhButton->SetColor(PCI_NORMAL, 223);
    pContrastEnhButton->SetColor(PCI_NTEXT, BLUE);
    Add(pContrastEnhButton);

    ChildRect.Set(iLeft + 11, iTop + 103, iLeft + 200, iTop + 127);
    pGreenBoostButton = new TVDecoratedButton(ChildRect, LS(SID_GreenBoostButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, GreenBoostButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pGreenBoostButton->SetColor(PCI_NORMAL, 223);
    pGreenBoostButton->SetColor(PCI_NTEXT, BLUE);
    Add(pGreenBoostButton);

    ChildRect.Set(iLeft + 11, iTop + 73, iLeft + 200, iTop + 97);
    pAutoFleshButton = new TVDecoratedButton(ChildRect, LS(SID_AutoFleshButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, AutoFleshButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pAutoFleshButton ->SetColor(PCI_NORMAL, 223);
    pAutoFleshButton ->SetColor(PCI_NTEXT, BLUE);
    Add(pAutoFleshButton );

    ChildRect.Set(iLeft + 11, iTop + 43, iLeft + 200, iTop + 67);
    pTintButton = new TVDecoratedButton(ChildRect, LS(SID_TintButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, TintButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
    pTintButton->SetColor(PCI_NORMAL, 223);
    pTintButton->SetColor(PCI_NTEXT, BLUE);
    Add(pTintButton);

    ChildRect.Set(iLeft + 20, iTop + 4, iLeft + 159, iTop + 33);
    pPicturePlusMenuWindowTitle = new PegPrompt(ChildRect, LS(SID_PicturePlusMenuButton), PicturePlusWindowTitleID, FF_NONE|AF_TRANSPARENT|TJ_CENTER);
    pPicturePlusMenuWindowTitle->SetColor(PCI_NORMAL, 130);
    pPicturePlusMenuWindowTitle->SetColor(PCI_NTEXT, BLUE);
    Add(pPicturePlusMenuWindowTitle);

    /* WB End Construction */
		Id(PICTURE_PLUS_MENU_ID);

		if (gbCurrentLanguage == 1) /* language = chinese */
		{
	    pPicturePlusMenuWindowTitle->SetFont(&A12RFont);
		}
		else if (gbCurrentLanguage == 2)  /* language = korean */
		{
	    pPicturePlusMenuWindowTitle->SetFont(&korean);
		}
		else /* default for English & French */
		{
	    pPicturePlusMenuWindowTitle->SetFont(&Pronto_16);
		}

		RefreshPicturePlusWindow(); /* Initialize Picture plus window */
}
示例#26
0
文件: svaudio.cpp 项目: garyqinyu/abv
/*--------------------------------------------------------------------------*/
ServiceAudioMenuClass::ServiceAudioMenuClass(SIGNED iLeft, SIGNED iTop) : 
    PegBitmapWindow(NULL, kAutoAdjustBitmapSize, PegBlueTransparent, FF_RAISED) 
{
	PegRect ChildRect;

	mReal.Set(iLeft, iTop, iLeft + 393, iTop + 213);
	InitClient();
	RemoveStatus(PSF_MOVEABLE|PSF_SIZEABLE);

	ChildRect.Set(iLeft + 200, iTop + 172, iLeft + 379, iTop + 192);
	pThrSwNICAMBar = new TVProgressBar(ChildRect, FF_NONE|PS_SHOW_VAL, ucThrSwNICAMMin, ucThrSwNICAMMax, 0);
	Add(pThrSwNICAMBar);

	ChildRect.Set(iLeft + 200, iTop + 142, iLeft + 379, iTop + 162);
	pPrescNICAMBar = new TVProgressBar(ChildRect, FF_NONE|PS_SHOW_VAL, scPrescNICAMMin, scPrescNICAMMax, 0);
	Add(pPrescNICAMBar);

	ChildRect.Set(iLeft + 200, iTop + 112, iLeft + 379, iTop + 132);
	pPrescFMBar = new TVProgressBar(ChildRect, FF_NONE|PS_SHOW_VAL, scPrescFMMin, scPrescFMMax, 0);
	Add(pPrescFMBar);

	ChildRect.Set(iLeft + 200, iTop + 82, iLeft + 379, iTop + 102);
	pPrescSCARTBar = new TVProgressBar(ChildRect, FF_NONE|PS_SHOW_VAL, scPrescSCARTMin, scPrescSCARTMax, 0);
	Add(pPrescSCARTBar);

	ChildRect.Set(iLeft + 200, iTop + 52, iLeft + 379, iTop + 72);
	pAGCAdjBar = new TVProgressBar(ChildRect, FF_NONE|PS_SHOW_VAL, ucAGCMin, ucAGCMax, 0);
	Add(pAGCAdjBar);

	ChildRect.Set(iLeft + 10, iTop + 170, iLeft + 189, iTop + 197);
	pThrSwNICAMButton = new TVDecoratedButton(ChildRect, LSA(SID_ThrSwNICAMButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, ThrSwNICAMButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
	pThrSwNICAMButton->SetColor(PCI_NORMAL, 223);
	pThrSwNICAMButton->SetColor(PCI_NTEXT, BLUE);
	Add(pThrSwNICAMButton);

	ChildRect.Set(iLeft + 10, iTop + 140, iLeft + 169, iTop + 167);
	pPrescNICAMButton = new TVDecoratedButton(ChildRect, LSA(SID_PrescNICAMButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, PrescNICAMButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
	pPrescNICAMButton->SetColor(PCI_NORMAL, 223);
	pPrescNICAMButton->SetColor(PCI_NTEXT, BLUE);
	Add(pPrescNICAMButton);

	ChildRect.Set(iLeft + 10, iTop + 110, iLeft + 169, iTop + 137);
	pPrescFMButton = new TVDecoratedButton(ChildRect, LSA(SID_PrescFMButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, PrescFMButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
	pPrescFMButton->SetColor(PCI_NORMAL, 223);
	pPrescFMButton->SetColor(PCI_NTEXT, BLUE);
	Add(pPrescFMButton);

	ChildRect.Set(iLeft + 10, iTop + 80, iLeft + 169, iTop + 107);
	pPrescSCARTButton = new TVDecoratedButton(ChildRect, LSA(SID_PrescSCARTButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, PrescSCARTButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
	pPrescSCARTButton->SetColor(PCI_NORMAL, 223);
	pPrescSCARTButton->SetColor(PCI_NTEXT, BLUE);
	Add(pPrescSCARTButton);

	ChildRect.Set(iLeft + 10, iTop + 50, iLeft + 169, iTop + 77);
	pAGCAdjButton = new TVDecoratedButton(ChildRect, LSA(SID_AGCAdjButton), &gbBullet5Bitmap, tAnimationTable, 6, RED, BLUE, AGCAdjButtonID, FF_NONE|AF_ENABLED|AF_TRANSPARENT);
	pAGCAdjButton->SetColor(PCI_NORMAL, 223);
	pAGCAdjButton->SetColor(PCI_NTEXT, BLUE);
	Add(pAGCAdjButton);

	ChildRect.Set(iLeft + 10, iTop + 2, iLeft + 389, iTop + 48);
	pServiceAudioMenuTitle = new PegPrompt(ChildRect, LSA(SID_ServiceAudioMenuWindowTitle), ServiceAudioMenuTitleID);
	pServiceAudioMenuTitle->SetColor(PCI_NORMAL, BLUE);
	pServiceAudioMenuTitle->SetColor(PCI_NTEXT, BLUE);
	Add(pServiceAudioMenuTitle);

	/* WB End Construction */

	Id(SERVICE_AUDIO_MENU_ID);

	/* Set font for the Title of the window */
	if (gbCurrentLanguage == 1) /* language = chinese */
	{
		pServiceAudioMenuTitle->SetFont(&A12RFont);
	}
	else if (gbCurrentLanguage == 2)  /* language = korean */
	{
		pServiceAudioMenuTitle->SetFont(&korean);
	}
	else /* default for English & French */
	{
		pServiceAudioMenuTitle->SetFont(&Pronto_16);
	}

	/* Set font for the value written in the bars */
	pThrSwNICAMBar->SetFont(&Pronto_12);
	pPrescNICAMBar->SetFont(&Pronto_12);
	pPrescFMBar->SetFont(&Pronto_12);
	pPrescSCARTBar->SetFont(&Pronto_12);
	pAGCAdjBar->SetFont(&Pronto_12);

	/* Remove focus from the bars */
	pThrSwNICAMBar->RemoveStatus(PSF_ACCEPTS_FOCUS);
	pPrescNICAMBar->RemoveStatus(PSF_ACCEPTS_FOCUS);
	pPrescFMBar->RemoveStatus(PSF_ACCEPTS_FOCUS);
	pPrescSCARTBar->RemoveStatus(PSF_ACCEPTS_FOCUS);
	pAGCAdjBar->RemoveStatus(PSF_ACCEPTS_FOCUS);

	pAGCMessageWindow = NULL;

}
示例#27
0
PegScreen *CreateWinScreen(HWND hwnd)
{
    PegRect rSize;
    rSize.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    return (new SED1375Screen8(hwnd, rSize));
}
示例#28
0
/*--------------------------------------------------------------------------*/
PegScreen *CreatePegScreen(void)
{
    PegRect Rect;
    Rect.Set(0, 0, PEG_VIRTUAL_XSIZE - 1, PEG_VIRTUAL_YSIZE - 1);
    return new GenericSvgaScreen(Rect);
}