当前位置: 首页>>代码示例>>C++>>正文


C++ CLASSINFO函数代码示例

本文整理汇总了C++中CLASSINFO函数的典型用法代码示例。如果您正苦于以下问题:C++ CLASSINFO函数的具体用法?C++ CLASSINFO怎么用?C++ CLASSINFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CLASSINFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: wxASSERT

bool MyComboBoxValidator::TransferFromWindow()
{
    wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxComboBox)));

    if ( m_var )
    {
        wxComboBox* cb = (wxComboBox*)GetWindow();
        if ( !cb )
            return false;

        *m_var = cb->GetValue();
    }

    return true;
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:15,代码来源:validate.cpp

示例2: wxMacGetBoundsForControl

bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
           const wxString& label,
           const wxPoint& pos,
           const wxSize& size, long style,
           const wxValidator& validator,
           const wxString& name)
{
    m_macIsUserPane = false ;

    if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
        return false;

    m_label = label ;

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;

    m_peer = new wxMacControl(this) ;
    verify_noerr ( CreateRadioButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") ,
        0 , false /* no autotoggle */ , m_peer->GetControlRefAddr() ) );


    MacPostControlCreate(pos,size) ;

    m_cycle = this ;

    if (HasFlag(wxRB_GROUP))
    {
        AddInCycle( NULL ) ;
    }
    else
    {
        /* search backward for last group start */
        wxRadioButton *chief = (wxRadioButton*) NULL;
        wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast();
        while (node)
        {
            wxWindow *child = node->GetData();
            if (child->IsKindOf( CLASSINFO( wxRadioButton ) ) )
            {
                chief = (wxRadioButton*) child;
                if (child->HasFlag(wxRB_GROUP)) break;
            }
            node = node->GetPrevious();
        }
        AddInCycle( chief ) ;
    }
    return true;
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:48,代码来源:radiobut.cpp

示例3: GetParentCanvas

void wxSFMultiSelRect::OnBottomHandle(wxSFShapeHandle& handle)
{
	if(GetParentCanvas()  && !AnyHeightExceeded(handle.GetDelta()))
	{
        wxXS::RealPointList::compatibility_iterator ptnode;
	    wxSFLineShape* pLine;
	    wxRealPoint* pt;

		double dy, sy = (GetRectSize().y - 2*sfDEFAULT_ME_OFFSET + handle.GetDelta().y)/(GetRectSize().y - 2*sfDEFAULT_ME_OFFSET);

		ShapeList m_lstSelection;
		GetParentCanvas()->GetSelectedShapes(m_lstSelection);

		ShapeList::compatibility_iterator node = m_lstSelection.GetFirst();
		while(node)
		{
			wxSFShapeBase* pShape = node->GetData();

            if(!pShape->IsKindOf(CLASSINFO(wxSFLineShape)))
            {
                dy = (pShape->GetAbsolutePosition().y - (GetAbsolutePosition().y + sfDEFAULT_ME_OFFSET))/(GetRectSize().y - 2*sfDEFAULT_ME_OFFSET)*handle.GetDelta().y;

                if(pShape->ContainsStyle(sfsSIZE_CHANGE)) pShape->Scale(1, sy, sfWITHCHILDREN);
                if(pShape->ContainsStyle(sfsPOSITION_CHANGE)) pShape->MoveBy(0, dy);
				
				if( ! pShape->ContainsStyle( sfsNO_FIT_TO_CHILDREN ) ) pShape->FitToChildren();
            }
            else
            {
                if(pShape->ContainsStyle(sfsPOSITION_CHANGE))
                {
                    pLine = (wxSFLineShape*)pShape;
                    ptnode = pLine->GetControlPoints().GetFirst();
                    while(ptnode)
                    {
                        pt = ptnode->GetData();
                        dy = ( pt->y - (GetAbsolutePosition().y + sfDEFAULT_ME_OFFSET))/(GetRectSize().y - 2*sfDEFAULT_ME_OFFSET)*handle.GetDelta().y;
                        pt->y += dy;
                        pt->y = floor(pt->y);
                        ptnode = ptnode->GetNext();
                    }
                }
            }

            node = node->GetNext();
		}
	}
}
开发者ID:GWRon,项目名称:wx.mod,代码行数:48,代码来源:MultiSelRect.cpp

示例4: WXUNUSED

bool wxGenericImageList::Draw( int index, wxDC &dc, int x, int y,
                               int flags, bool WXUNUSED(solidBackground) )
{
    wxObjectList::compatibility_iterator node = m_images.Item( index );

    wxCHECK_MSG( node, false, wxT("wrong index in image list") );

    wxBitmap *bm = (wxBitmap*)node->GetData();

    if (bm->IsKindOf(CLASSINFO(wxIcon)))
        dc.DrawIcon( * ((wxIcon*) bm), x, y);
    else
        dc.DrawBitmap( *bm, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 );

    return true;
}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:16,代码来源:imaglist.cpp

示例5: GetNotebookAffiliation

int CFrame::GetNotebookAffiliation(wxWindowID Id)
{
	for (u32 i = 0, j = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
	{
		if (!m_Mgr->GetAllPanes()[i].window->IsKindOf(CLASSINFO(wxAuiNotebook)))
			continue;
		wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
		for(u32 k = 0; k < NB->GetPageCount(); k++)
		{
			if (NB->GetPage(k)->GetId() == Id)
				return j;
		}
		j++;
	}
	return -1;
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:16,代码来源:FrameAui.cpp

示例6: ResetToolbarStyle

void CFrame::ResetToolbarStyle()
{
	wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
	for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i)
	{
		wxAuiPaneInfo& Pane = AllPanes[i];
		if (Pane.window->IsKindOf(CLASSINFO(wxAuiToolBar)))
		{
			Pane.Show();
			// Show all of it
			if (Pane.rect.GetLeft() > GetClientSize().GetX() - 50)
				Pane.Position(GetClientSize().GetX() - Pane.window->GetClientSize().GetX());
		}
	}
	m_Mgr->Update();
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:16,代码来源:FrameAui.cpp

示例7: wxMacControlDefinition

pascal SInt32  wxMacControlDefinition(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param)
{
    
    wxControl*  wx = (wxControl*) wxFindControlFromMacControl( theControl ) ;
    if ( wx != NULL && wx->IsKindOf( CLASSINFO( wxControl ) ) )
    {
        if( message == drawCntl )
        {
            wxMacWindowClipper clip( wx ) ;
            return InvokeControlDefUPP( varCode , theControl , message , param , (ControlDefUPP) wx->MacGetControlAction() ) ;
        }
        else
            return InvokeControlDefUPP( varCode , theControl , message , param , (ControlDefUPP) wx->MacGetControlAction() ) ;
    }
    return  NULL ;
}
开发者ID:Duion,项目名称:Torsion,代码行数:16,代码来源:control.cpp

示例8: AddRemoveBlankPage

void CFrame::AddRemoveBlankPage()
{
	for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
	{
		if (!m_Mgr->GetAllPanes()[i].window->IsKindOf(CLASSINFO(wxAuiNotebook)))
			continue;
		wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
		for(u32 j = 0; j < NB->GetPageCount(); j++)
		{
			if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1)
				NB->DeletePage(j);
		}
		if (NB->GetPageCount() == 0)
			NB->AddPage(new wxPanel(this, wxID_ANY), wxT("<>"), true);
	}
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:16,代码来源:FrameAui.cpp

示例9: GetChildren

void BdayFrame::onClose( wxCloseEvent& event )
{
  if ( event.CanVeto() )
  {
    wxWindowList & wnds = GetChildren();
    for ( wxWindowList::iterator it = wnds.begin(); it != wnds.end(); ++it )
      if ( ( *it )->IsKindOf(CLASSINFO(wxFrame)) )
        if ( ! ((wxFrame *)( *it ))->Close() )
        {
          event.Veto(true);
          return;
        }
  }

  event.Skip();
}
开发者ID:evmcl,项目名称:bday,代码行数:16,代码来源:BdayFrame.cpp

示例10: WXUNUSED

void MyEvtHandler::OnEndDragRight(double x, double y, int WXUNUSED(keys), int WXUNUSED(attachment))
{
  GetShape()->GetCanvas()->ReleaseMouse();
  MyCanvas *canvas = (MyCanvas *)GetShape()->GetCanvas();

  // Check if we're on an object
  int new_attachment;
  wxShape *otherShape = canvas->FindFirstSensitiveShape(x, y, &new_attachment, OP_DRAG_RIGHT);

  if (otherShape && !otherShape->IsKindOf(CLASSINFO(wxLineShape)))
  {
    canvas->view->GetDocument()->GetCommandProcessor()->Submit(
      new DiagramCommand(_T("wxLineShape"), OGLEDIT_ADD_LINE, (DiagramDocument *)canvas->view->GetDocument(), CLASSINFO(wxLineShape),
      0.0, 0.0, false, NULL, GetShape(), otherShape));
  }
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:16,代码来源:doc.cpp

示例11: wxLuaGetClassList_wxmedia

wxLuaBindClass* wxLuaGetClassList_wxmedia(size_t &count)
{
    static wxLuaBindClass classList[] =
    {
#if wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL
        { wxluaclassname_wxMediaCtrl, wxMediaCtrl_methods, wxMediaCtrl_methodCount, CLASSINFO(wxMediaCtrl), &wxluatype_wxMediaCtrl, wxluabaseclassnames_wxMediaCtrl, wxluabaseclassbinds_wxMediaCtrl, NULL, NULL, NULL, 0, &wxLua_wxMediaCtrl_delete_function, }, 
        { wxluaclassname_wxMediaEvent, wxMediaEvent_methods, wxMediaEvent_methodCount, CLASSINFO(wxMediaEvent), &wxluatype_wxMediaEvent, wxluabaseclassnames_wxMediaEvent, wxluabaseclassbinds_wxMediaEvent, NULL, NULL, NULL, 0, &wxLua_wxMediaEvent_delete_function, }, 
#endif // wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL


        { 0, 0, 0, 0, 0, 0, 0 }, 
    };
    count = sizeof(classList)/sizeof(wxLuaBindClass) - 1;

    return classList;
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:16,代码来源:wxmedia_bind.cpp

示例12:

wxWindow * CFrame::GetNotebookPageFromId(wxWindowID Id)
{
	for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
	{
		if (!m_Mgr->GetAllPanes()[i].window->IsKindOf(CLASSINFO(wxAuiNotebook)))
			continue;

		wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
		for (u32 j = 0; j < NB->GetPageCount(); j++)
		{
			if (NB->GetPage(j)->GetId() == Id)
				return NB->GetPage(j);
		}
	}
	return nullptr;
}
开发者ID:Pnum,项目名称:dolphin,代码行数:16,代码来源:FrameAui.cpp

示例13: AdjustRemoteScrollbars

// Adjust the containing wxScrolledWindow's scrollbars appropriately
void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
{
    if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
    {
        // This is for the generic tree control.
        // It calls SetScrollbars which has been overridden
        // to adjust the parent scrolled window vertical
        // scrollbar.
        ((wxGenericTreeCtrl*) this)->AdjustMyScrollbars();
        return;
    }
    else
    {
        // This is for the wxMSW tree control
        ecScrolledWindow* scrolledWindow = GetScrolledWindow();
        if (scrolledWindow)
        {
            wxRect itemRect;
            if (GetBoundingRect(GetRootItem(), itemRect))
            {
                // Actually, the real height seems to be 1 less than reported
                // (e.g. 16 instead of 16)
                int itemHeight = itemRect.GetHeight() - 1;
                
                int w, h;
                GetClientSize(&w, &h);
                
                wxRect rect(0, 0, 0, 0);
                CalcTreeSize(rect);
                
                double f = ((double) (rect.GetHeight()) / (double) itemHeight)  ;
                int treeViewHeight = (int) ceil(f);
                
                int scrollPixelsPerLine = itemHeight;
                int scrollPos = - (itemRect.y / itemHeight);
                
                scrolledWindow->SetScrollbars(0, scrollPixelsPerLine, 0, treeViewHeight, 0, scrollPos);
                
                // Ensure that when a scrollbar becomes hidden or visible,
                // the contained window sizes are right.
                // Problem: this is called too early (?)
                wxSizeEvent event(scrolledWindow->GetSize(), scrolledWindow->GetId());
                scrolledWindow->GetEventHandler()->ProcessEvent(event);
            }
        }
    }
}
开发者ID:Undrizzle,项目名称:yolanda,代码行数:48,代码来源:splittree.cpp

示例14: GetScrolledWindow

int CScrolledTreeCtrl::GetScrollPos(int orient) const
{
#if !defined(__WXMSW__)
    wxScrolledWindow *scrolledWindow = GetScrolledWindow();

    if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) {
        wxGenericTreeCtrl *win = (wxGenericTreeCtrl *) this;

        if (orient == wxHORIZONTAL) {
            return win->wxGenericTreeCtrl::GetScrollPos(orient);
        } else {
            return scrolledWindow->GetScrollPos(orient);
        }
    }
#endif
    return 0;
}
开发者ID:MaurodeLyon,项目名称:Embedded-Software-Ontwikkeling,代码行数:17,代码来源:scrolledtree.cpp

示例15: defined

void CRenderWnd::ReflectDoubleBufferingInChildren(wxWindow * pWindow)
{
#if defined(__WXGTK__)
	// Process this one
	if (pWindow->IsKindOf(CLASSINFO(CRenderWnd)))
		::SetDoubleBuffer(pWindow, m_DoubleBuffer);
#endif

	// Now process children if any
	wxWindowList::Node * pNode = pWindow->GetChildren().GetFirst();
	while (pNode)
	{
		ReflectDoubleBufferingInChildren(pNode->GetData());
		pNode = pNode->GetNext();
	}
	return;
}
开发者ID:vata,项目名称:xarino,代码行数:17,代码来源:rendwnd.cpp


注:本文中的CLASSINFO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。