示例#1
0
// 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);
}
示例#2
0
文件: pane.cpp 项目: gitrider/wxsj2
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;
}
示例#3
0
	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