#include <bitmapgriddropdown.h>
Inheritance diagram for CBGDDKernelBitmapItem:
Public Member Functions | |
CBGDDKernelBitmapItem (KernelBitmap *pKernelBitmap, BOOL bAutodelete=TRUE, String_256 strLabel=String_256(), BOOL bStretch=TRUE) | |
virtual | ~CBGDDKernelBitmapItem () |
Protected Member Functions | |
virtual wxBitmap * | RenderItemToBitmap (wxSize szBitmap) const |
Protected Attributes | |
KernelBitmap * | m_pKernelBitmap |
BOOL | m_bDeleteKernelBitmap |
BOOL | m_bStretch |
Definition at line 232 of file bitmapgriddropdown.h.
|
Definition at line 413 of file bitmapgriddropdown.cpp. 00415 : CBGDDCachedItem(strLabel) 00416 { 00417 m_pKernelBitmap = pKernelBitmap; 00418 m_bDeleteKernelBitmap = bAutodelete; 00419 m_bStretch = bStretch; 00420 }
|
|
Definition at line 422 of file bitmapgriddropdown.cpp. 00423 { 00424 if (m_bDeleteKernelBitmap) 00425 delete m_pKernelBitmap; 00426 }
|
|
Function : CBGDDKernelBitmapItem::GetWxBitmap Author : Mikhail Tatarnikov Purpose : Gets the wxBitmap representation of the currently stored KernelBitmap Returns : wxBitmap* - the required version of the KernelBitmap. Exceptions: Parameters: [in] wxSize szBitmap - the size of representation. Notes : Since the KernelBitmap stored in the item can be of considerable size, we have to speed up the drawing (and scaling). It's done by caching the bitmap representations. Reimplemented from CBGDDCachedItem. Definition at line 441 of file bitmapgriddropdown.cpp. 00442 { 00443 // NOTE: the maximum size of bitmap allowed by BitmapDragInformation is 180*??? pixels!! 00444 wxMemoryDC dcMem; 00445 wxBitmap* pBitmap = new wxBitmap(szBitmap.x, szBitmap.y); 00446 dcMem.SelectObject(*pBitmap); 00447 dcMem.SetUserScale(1.0, 1.0); 00448 00449 wxSize szDragBitmap = szBitmap; 00450 if (!m_bStretch) 00451 szDragBitmap = wxSize(m_pKernelBitmap->GetWidth(), m_pKernelBitmap->GetHeight()); 00452 00453 BitmapDragInformation oDragBitmap(m_pKernelBitmap, szDragBitmap.x, szDragBitmap.y, 0, 0); 00454 oDragBitmap.OnDrawSolidDrag(wxPoint(0, 0), &dcMem); 00455 00456 dcMem.SelectObject(wxNullBitmap); 00457 00458 return pBitmap; 00459 }
|
|
Definition at line 245 of file bitmapgriddropdown.h. |
|
Definition at line 246 of file bitmapgriddropdown.h. |
|
Definition at line 244 of file bitmapgriddropdown.h. |