• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CLASSINFO函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: wxCHECK_MSG

// Get the icon
wxIcon wxImageList::GetIcon(int index) const
{
    wxList::compatibility_iterator node = m_images.Item( index );

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

    wxObject* obj = (wxObject*) node->GetData();
    if ( obj == NULL )
        return wxNullIcon ;
    else if ( obj->IsKindOf(CLASSINFO(wxBitmap)) )
    {
        wxFAIL_MSG( wxT("cannot convert from bitmap to icon") ) ;
        return wxNullIcon ;
    }
    else
        return *(static_cast<wxIcon*>(obj)) ;
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:18,代码来源:imaglist.cpp


示例17: OnRetrieveValue

bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
                                          wxWindow *WXUNUSED(parentWindow) )
{
    // The item used for viewing the real number: should be a text item.
    wxWindow *m_propertyWindow = property->GetWindow();
    if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
        return false;

    wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());

    if (value.Length() == 0)
        return false;

    float f = (float)wxAtof((const wxChar *)value);
    property->GetValue() = f;
    return true;
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:17,代码来源:propform.cpp


示例18: while

void ClassListDialog::InitControls()
{
    // create a wxArrayString with the names of all classes:
    const wxClassInfo *ci = wxClassInfo::GetFirst();
    wxArrayString arr;
    while (ci)
    {
        arr.Add(ci->GetClassName());
        ci = ci->GetNext();
    }

    arr.Sort();     // sort alphabetically

    // now add it to the raw-mode listbox
    for (unsigned int i=0; i<arr.GetCount(); i++)
        if (!IsToDiscard(arr[i]))
            m_pRawListBox->Append(arr[i]);
    m_nCount = m_pRawListBox->GetCount();

    // sort again using size as sortkey
    arr.Sort((wxArrayString::CompareFunction)CompareClassSizes);

    // now add it to the size-mode listbox
    for (unsigned int i=0; i<arr.GetCount(); i++)
        if (!IsToDiscard(arr[i]))
            m_pSizeListBox->Append(arr[i]);

    // add root item to parent-mode treectrl
    wxTreeItemId id = m_pParentTreeCtrl->AddRoot(wxT("wxObject"));

    // recursively add all leaves to the treectrl
    int count = AddClassesWithParent(CLASSINFO(wxObject), id);
    m_pParentTreeCtrl->SetItemText(id, m_pParentTreeCtrl->GetItemText(id) +
                                 wxString::Format(wxT(" [%d]"), count));

    // initially expand the root item
    m_pParentTreeCtrl->Expand(id);

    m_nTotalCount = arr.GetCount();
    UpdateFilterText();

    // don't leave blank the XTI info display
    m_pChoiceBook->ChangeSelection(0);
    m_pRawListBox->Select(0);
    UpdateClassInfo(m_pRawListBox->GetStringSelection());
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:46,代码来源:classlist.cpp


示例19: BeginDrag

// Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. This is full screen only. fullScreenRect gives the
// position of the window on the screen, to restrict the drag to.
bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect)
{
    wxRect rect;

    int x = fullScreenRect->GetPosition().x;
    int y = fullScreenRect->GetPosition().y;

    wxSize sz = fullScreenRect->GetSize();

    if (fullScreenRect->GetParent() && !fullScreenRect->IsKindOf(CLASSINFO(wxFrame)))
        fullScreenRect->GetParent()->ClientToScreen(& x, & y);

    rect.x = x; rect.y = y;
    rect.width = sz.x; rect.height = sz.y;

    return BeginDrag(hotspot, window, true, & rect);
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:20,代码来源:dragimag.cpp


示例20: GetScrolledWindow

// In case we're using the generic tree control.
int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const
{
    ecScrolledWindow* scrolledWindow = GetScrolledWindow();
    
    if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
    {
        wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
        
        if (orient == wxHORIZONTAL)
            return win->wxGenericTreeCtrl::GetScrollPos(orient);
        else
        {
            return scrolledWindow->GetScrollPos(orient);
        }
    }
    return 0;
}
开发者ID:Undrizzle,项目名称:yolanda,代码行数:18,代码来源:splittree.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CLASS_OF函数代码示例发布时间:2022-05-30
下一篇:
C++ CLASSERT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap