void MBEditLook::OnFrameDraw(MEdit* pEdit, MDrawContext* pDC) { MRECT r = pEdit->GetInitialClientRect(); if(GetCustomLook()) { pDC->SetColor(MCOLOR(200,200,200,255)); pDC->Rectangle(r); HLineBitmap( pDC, r.x+1, r.y+1, r.w-2, m_pFrameBitmaps[4], false ); return; } DrawBitmapFrame9(pDC, r, m_pFrameBitmaps); }
void CCBButtonLook::OnUpDraw(CCButton* pButton, CCDrawContext* pDC) { if( pButton->GetType() == CCBT_PUSH2 && pButton->GetCheck() ) { OnDownDraw( pButton, pDC ); return; } sRect r = pButton->GetInitialClientRect(); if( GetCustomLook() ) DrawBitmapButtonCustom1( pDC, r, m_pUpBitmaps, false, m_bStretch ); else DrawBitmapFrame9(pDC, r, m_pUpBitmaps, m_bStretch, GetScale() ); if(pButton->IsFocus()==true) DrawFocus(pDC, r); DrawText(pButton, pDC, pButton->GetClientRect(), pButton->m_szName, pButton->GetAlignment()); }
void ZStageInfoBox::OnDraw(MDrawContext* pDC) { if(m_pLook) { MRECT r = GetInitialClientRect(); int nShowCount=0; for(int i=GetStartItem(); i<GetCount(); i++){ nShowCount++; if(nShowCount>=GetShowItemCount()) break; MRECT itemrect=MRECT(r.x,r.y+GetItemHeight()*(nShowCount-1),r.w,GetItemHeight()); DrawBitmapFrame9(pDC, itemrect, m_pLook->m_pFrameBitmaps); } } MListBox::OnDraw(pDC); }
void CCBButtonLook::OnDownDraw(CCButton* pButton, CCDrawContext* pDC) { sRect r = pButton->GetInitialClientRect(); if( GetCustomLook() ) { DrawBitmapButtonCustom1( pDC, r, m_pDownBitmaps, true, m_bStretch ); r = pButton->GetClientRect(); r.x += 1; r.y += 1; r.w += 1; r.h += 1; } else { DrawBitmapFrame9(pDC, r, m_pDownBitmaps, m_bStretch, GetScale() ); r = pButton->GetClientRect(); } if(pButton->IsFocus()==true) DrawFocus(pDC, r); DrawText(pButton, pDC, r, pButton->m_szName, pButton->GetAlignment()); }
void MBTabCtrlLook::OnDraw(MTabCtrl* pTabCtrl, MDrawContext* pDC) { MRECT r = pTabCtrl->GetInitialClientRect(); DrawBitmapFrame9(pDC, r, m_pFrameBitmaps, false, false); }
void MBFrameLook::OnDraw(MFrame* pFrame, MDrawContext* pDC) { MRECT r = pFrame->GetInitialClientRect(); // 땜.. 장비창의 tooltip frame - // DrawBitmapFrame2 로 2장의 이미지를 사용해서 그림.. if(GetCustomLook()==3) { if(pFrame->GetVisible()==false) return; MRECT rr = r; // 툴팁이라서 그리는 영역을 조금 보정.. rr.x -= 10; rr.y -= 10; rr.w += 20; rr.h += 20; // 지금은 툴팁 대용으로 쓰기때문에 cliprect 를 무시.. MRECT cliprect = MRECT(0,0,MGetWorkspaceWidth(),MGetWorkspaceHeight()); DrawBitmapFrame2(pDC,rr,cliprect,m_pFrameBitmaps); return; } MCOLOR color = MCOLOR(0xFF, 0xFF, 0xFF, pFrame->GetOpacity()); if( GetCustomLook() == 1 ) DrawBitmapFrameCustom1(pDC, r, m_pFrameBitmaps, m_bStretch); else if( GetCustomLook() == 2) DrawBitmapFrameCustom2(pDC, r, m_pFrameBitmaps, m_BGColor, m_bStretch ); else if( GetCustomLook() == 3 ) { pDC->SetColor( 128, 128, 128 ); //r = pFrame->GetRect(); pDC->Rectangle( r ); } else DrawBitmapFrame9(pDC, r, m_pFrameBitmaps, m_bStretch, GetScale()); if(pFrame->m_bTitleBar==true){ if (pFrame->GetCloseButton()->m_bVisible) { MBitmap* pBitmap; if (pFrame->GetCloseButton()->IsButtonDown() == false) { pBitmap = m_pCloseButtonBitmaps[0]; } else { pBitmap = m_pCloseButtonBitmaps[1]; if (pBitmap == NULL) pBitmap = m_pCloseButtonBitmaps[0]; } if (pBitmap!=NULL) { int x, y; x = pFrame->GetCloseButton()->m_Rect.x; y = pFrame->GetCloseButton()->m_Rect.y; pDC->SetBitmap(pBitmap); pDC->Draw(x, y); } } if (pFrame->GetMinimizeButton()->m_bVisible) { MBitmap* pBitmap; if (pFrame->GetMinimizeButton()->IsButtonDown() == false) { pBitmap = m_pMinimizeButtonBitmaps[0]; } else { pBitmap = m_pMinimizeButtonBitmaps[1]; if (pBitmap == NULL) pBitmap = m_pMinimizeButtonBitmaps[0]; } if (pBitmap!=NULL) { int x, y; x = pFrame->GetMinimizeButton()->m_Rect.x; y = pFrame->GetMinimizeButton()->m_Rect.y; pDC->SetBitmap(pBitmap); pDC->Draw(x, y); } } if(m_pFont!=NULL) pDC->SetFont(m_pFont); pDC->SetColor(MCOLOR(0x0)); if( GetCustomLook() == 0 ) pDC->Text(r.x+16, r.y+12, pFrame->m_szName); /* pDC->Text(r.x+12, r.y+8, pFrame->m_szName); pDC->Text(r.x+16, r.y+8, pFrame->m_szName); pDC->Text(r.x+12, r.y+12, pFrame->m_szName); */ pDC->SetColor(m_FontColor); // 나중에 align고려해서 다시 수정해야 함 int y = int(m_TitlePosition.y*GetScale()); if(m_pFrameBitmaps[7]) { int au = (int)(GetScale() * m_pFrameBitmaps[7]->GetHeight()); y = (au - m_pFont->GetHeight())/2; } pDC->Text(int(r.x+m_TitlePosition.x*GetScale()), r.y+y, pFrame->m_szName); // pDC->Text(r.x+m_TitlePosition.x*GetScale(), r.y+m_TitlePosition.y*GetScale(), pFrame->m_szName); // pDC->Text(r.x+14, r.y+10, pFrame->m_szName); } }
void CCBTabCtrlLook::OnDraw(CCTabCtrl* pTabCtrl, CCDrawContext* pDC) { sRect r = pTabCtrl->GetInitialClientRect(); DrawBitmapFrame9(pDC, r, m_pFrameBitmaps, false, false); }