// calculates the client size necessary based on title and content CSize CBalloonHelp::CalcClientSize() { ASSERT(NULL != m_hWnd); CWindowDC dc(this); CSize sizeHeader = CalcHeaderSize(&dc); CSize sizeContent = CalcContentSize(&dc); return CSize(max(sizeHeader.cx,sizeContent.cx), sizeHeader.cy + nTIP_MARGIN + sizeContent.cy); }
bool wxPaneBase::Create( wxWindow *parent, wxWindowID id, const wxString& name, const wxPoint& pos, const wxSize& size, long style ) { bool result = wxPanel::Create( parent, id, pos, size, style, name ); // create toolbutton (the close button) m_toolButtonSize = DEFAULT_BUTTON_SIZE; m_pCloseButton = new wxToolButton( this, 0, wxDefaultPosition, m_toolButtonSize ); m_pCloseButton->SetDrawSize( DEFAULT_BUTTON_IMAGE_SIZE ); m_pCloseButton->SetToolTip( wxT("Close") ); wxASSERT(m_pCloseButton); CalcHeaderSize(); return result; }
long OpenSWF ( IO::InputStream *inputStream, TagState & inOutTagState ) { XMP_Uns64 pos = 0; long name; XMP_Uns32 len; inOutTagState.headerSize = CalcHeaderSize ( inputStream ); pos = inOutTagState.headerSize; // read first and following chunks bool running = true; while ( running ) { running = ReadTag ( inputStream, inOutTagState, &name, &len, pos ); if ( inOutTagState.cachingFile ) { if ( (! inOutTagState.hasXMP) || (inOutTagState.xmpLen > 0) ) running = false; } } return (long) inOutTagState.tags.size(); } // OpenSWF