예제 #1
0
void *wxItemContainer::GetClientData(unsigned int n) const
{
    wxCHECK_MSG( HasClientUntypedData(), NULL,
                  wxT("this window doesn't have void client data") );

    return DoGetItemClientData(n);
}
예제 #2
0
void wxChoice::SetString(unsigned int n, const wxString& s)
{
    wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::SetString") );

    // we have to delete and add back the string as there is no way to change a
    // string in place

    // we need to preserve the client data
    void *data;
    if ( m_clientDataItemsType != wxClientData_None )
    {
        data = DoGetItemClientData(n);
    }
    else // no client data
    {
        data = NULL;
    }

    ::SendMessage(GetHwnd(), CB_DELETESTRING, n, 0);
    ::SendMessage(GetHwnd(), CB_INSERTSTRING, n, (LPARAM)s.c_str() );

    if ( data )
    {
        DoSetItemClientData(n, data);
    }
    //else: it's already NULL by default

    InvalidateBestSize();
}
예제 #3
0
wxClientData *wxItemContainer::GetClientObject(unsigned int n) const
{
    wxCHECK_MSG( HasClientObjectData(), NULL,
                  wxT("this window doesn't have object client data") );

    return static_cast<wxClientData *>(DoGetItemClientData(n));
}
예제 #4
0
파일: ctrlsub.cpp 프로젝트: gitrider/wxsj2
void *wxItemContainer::GetClientData(int n) const
{
    wxASSERT_MSG( m_clientDataItemsType == wxClientData_Void,
                  wxT("this window doesn't have void client data") );

    return DoGetItemClientData(n);
}
예제 #5
0
void wxChoice::SetString(unsigned int n, const wxString& rsStr)
{
    LONG  nIndexType = 0;
    void* pData;

    if ( HasClientData() )
    {
        pData = DoGetItemClientData(n);
    }
    else // no client data
    {
        pData = NULL;
    }

    ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, 0);

    if (m_windowStyle & wxCB_SORT)
        nIndexType = LIT_SORTASCENDING;
    else
        nIndexType = LIT_END;
    ::WinSendMsg( GetHwnd()
                 ,LM_INSERTITEM
                 ,(MPARAM)nIndexType
                 ,(MPARAM)rsStr.wx_str()
                );

    if (pData)
    {
        DoSetItemClientData(n, pData);
    }
} // end of wxChoice::SetString
예제 #6
0
void wxItemContainer::SetClientObject(unsigned int n, wxClientData *data)
{
    wxASSERT_MSG( !HasClientUntypedData(),
                  wxT("can't have both object and void client data") );

    if ( HasClientObjectData() )
    {
        wxClientData * clientDataOld
            = static_cast<wxClientData *>(DoGetItemClientData(n));
        if ( clientDataOld )
            delete clientDataOld;
    }
    else // didn't have any client data so far
    {
        // now we have object client data
        DoInitItemClientData();

        SetClientDataType(wxClientData_Object);
    }

    DoSetItemClientData(n, data);
}
예제 #7
0
void LocalsView::OnLocalExpanding(wxDataViewEvent& event)
{
    event.Skip();
    CHECK_ITEM_RET( event.GetItem() );
    
    wxDataViewItem item = event.GetItem();
    wxDataViewItemArray children;
    if ( m_dataviewModel->GetChildren( item , children ) && children.GetCount() == 1 ) {
        wxDataViewItem child = children.Item(0);
        wxVariant v;
        m_dataviewModel->GetValue(v, child, 0);
        
        if ( v.GetString() == "<dummy>" ) {
            // a dummy node has been found
            // Delete this node and request from XDebug to expand it
            m_dataviewModel->SetValue( wxString("Loading..."), child, 0 );
            wxString propertyName = DoGetItemClientData( event.GetItem() );
            XDebugManager::Get().SendGetProperty( propertyName );
            m_waitingExpand.insert( std::make_pair(propertyName, item) );
        }
    }
}
예제 #8
0
wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
{
    return (wxClientData *)DoGetItemClientData(n);
}
예제 #9
0
파일: listbox.cpp 프로젝트: Duion/Torsion
wxClientData* wxListBox::DoGetItemClientObject(
  int                               n
) const
{
    return (wxClientData *)DoGetItemClientData(n);
}
예제 #10
0
파일: odcombo.cpp 프로젝트: 252525fb/rpcs3
wxClientData* wxOwnerDrawnComboBox::DoGetItemClientObject(unsigned int n) const
{
    return (wxClientData*) DoGetItemClientData(n);
}
예제 #11
0
파일: choice.cpp 프로젝트: Duion/Torsion
wxClientData* wxChoice::DoGetItemClientObject(
  int                               n
) const
{
    return (wxClientData *)DoGetItemClientData(n);
} // end of wxChoice::DoGetItemClientObject
예제 #12
0
파일: checklst.cpp 프로젝트: EdgarTx/wx
wxClientData* wxCheckListBox::DoGetItemClientObject(unsigned int n) const
{
    return (wxClientData *)DoGetItemClientData(n);
}