replaced by stubs files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,137 +1,240 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Purpose: wxListBox
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "listbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/listbox.h"
|
||||
#include "wx/utils.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListBox
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
|
||||
#endif
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl)
|
||||
// ============================================================================
|
||||
// list box control implementation
|
||||
// ============================================================================
|
||||
|
||||
wxListBox::wxListBox(void)
|
||||
// Listbox item
|
||||
wxListBox::wxListBox()
|
||||
{
|
||||
};
|
||||
m_noItems = 0;
|
||||
m_selected = 0;
|
||||
}
|
||||
|
||||
wxListBox::wxListBox( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos, const wxSize &size,
|
||||
int n, const wxString choices[],
|
||||
long style, const wxString &name )
|
||||
bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
int n, const wxString choices[],
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
Create( parent, id, pos, size, n, choices, style, name );
|
||||
};
|
||||
m_noItems = n;
|
||||
m_selected = 0;
|
||||
|
||||
bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos, const wxSize &size,
|
||||
int n, const wxString choices[],
|
||||
long style, const wxString &name )
|
||||
{
|
||||
return TRUE;
|
||||
};
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
||||
void wxListBox::Append( const wxString &item )
|
||||
{
|
||||
Append( item, (char*)NULL );
|
||||
};
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
void wxListBox::Append( const wxString &WXUNUSED(item), char *WXUNUSED(clientData) )
|
||||
{
|
||||
};
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
|
||||
void wxListBox::Clear(void)
|
||||
{
|
||||
};
|
||||
m_windowId = ( id == -1 ) ? (int)NewControlId() : id;
|
||||
|
||||
void wxListBox::Delete( int WXUNUSED(n) )
|
||||
{
|
||||
};
|
||||
// TODO create listbox
|
||||
|
||||
void wxListBox::Deselect( int WXUNUSED(n) )
|
||||
{
|
||||
};
|
||||
|
||||
int wxListBox::FindString( const wxString &WXUNUSED(item) ) const
|
||||
{
|
||||
return -1;
|
||||
};
|
||||
|
||||
char *wxListBox::GetClientData( int WXUNUSED(n) ) const
|
||||
{
|
||||
return (char*)NULL;
|
||||
};
|
||||
|
||||
int wxListBox::GetSelection(void) const
|
||||
{
|
||||
return -1;
|
||||
};
|
||||
|
||||
int wxListBox::GetSelections( wxArrayInt& WXUNUSED(aSelections) ) const
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
|
||||
wxString wxListBox::GetString( int WXUNUSED(n) ) const
|
||||
{
|
||||
return "";
|
||||
};
|
||||
|
||||
wxString wxListBox::GetStringSelection(void) const
|
||||
{
|
||||
return "";
|
||||
};
|
||||
|
||||
int wxListBox::Number(void)
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
|
||||
bool wxListBox::Selected( int WXUNUSED(n) )
|
||||
{
|
||||
return FALSE;
|
||||
};
|
||||
}
|
||||
|
||||
void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) )
|
||||
wxListBox::~wxListBox()
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
void wxListBox::SetClientData( int WXUNUSED(n), char *WXUNUSED(clientData) )
|
||||
void wxListBox::SetupColours()
|
||||
{
|
||||
};
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
}
|
||||
|
||||
void wxListBox::SetFirstItem( int WXUNUSED(n) )
|
||||
void wxListBox::SetFirstItem(int N)
|
||||
{
|
||||
};
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) )
|
||||
void wxListBox::SetFirstItem(const wxString& s)
|
||||
{
|
||||
};
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::SetSelection( int WXUNUSED(n), bool WXUNUSED(select) )
|
||||
void wxListBox::Delete(int N)
|
||||
{
|
||||
};
|
||||
m_noItems --;
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::SetString( int WXUNUSED(n), const wxString &WXUNUSED(string) )
|
||||
void wxListBox::Append(const wxString& item)
|
||||
{
|
||||
};
|
||||
m_noItems ++;
|
||||
|
||||
void wxListBox::SetStringSelection( const wxString &WXUNUSED(string), bool WXUNUSED(select) )
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::Append(const wxString& item, char *Client_data)
|
||||
{
|
||||
};
|
||||
m_noItems ++;
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::Set(int n, const wxString *choices, char** clientData)
|
||||
{
|
||||
m_noItems = n;
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
int wxListBox::FindString(const wxString& s) const
|
||||
{
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
void wxListBox::Clear()
|
||||
{
|
||||
m_noItems = 0;
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::SetSelection(int N, bool select)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
bool wxListBox::Selected(int N) const
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxListBox::Deselect(int N)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
char *wxListBox::GetClientData(int N) const
|
||||
{
|
||||
// TODO
|
||||
return (char *)NULL;
|
||||
}
|
||||
|
||||
void wxListBox::SetClientData(int N, char *Client_data)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// Return number of selections and an array of selected integers
|
||||
int wxListBox::GetSelections(wxArrayInt& aSelections) const
|
||||
{
|
||||
aSelections.Empty();
|
||||
|
||||
/* TODO
|
||||
if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED))
|
||||
{
|
||||
int no_sel = ??
|
||||
for ( int n = 0; n < no_sel; n++ )
|
||||
aSelections.Add(??);
|
||||
|
||||
return no_sel;
|
||||
}
|
||||
else // single-selection listbox
|
||||
{
|
||||
aSelections.Add(??);
|
||||
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get single selection, for single choice list items
|
||||
int wxListBox::GetSelection() const
|
||||
{
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Find string for position
|
||||
wxString wxListBox::GetString(int N) const
|
||||
{
|
||||
// TODO
|
||||
return wxString("");
|
||||
}
|
||||
|
||||
void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
|
||||
{
|
||||
m_noItems += nItems;
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxListBox::SetString(int N, const wxString& s)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
int wxListBox::Number () const
|
||||
{
|
||||
return m_noItems;
|
||||
}
|
||||
|
||||
// For single selection items only
|
||||
wxString wxListBox::GetStringSelection () const
|
||||
{
|
||||
int sel = GetSelection ();
|
||||
if (sel > -1)
|
||||
return this->GetString (sel);
|
||||
else
|
||||
return wxString("");
|
||||
}
|
||||
|
||||
bool wxListBox::SetStringSelection (const wxString& s, bool flag)
|
||||
{
|
||||
int sel = FindString (s);
|
||||
if (sel > -1)
|
||||
{
|
||||
SetSelection (sel, flag);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxListBox::Command (wxCommandEvent & event)
|
||||
{
|
||||
if (event.m_extraLong)
|
||||
SetSelection (event.m_commandInt);
|
||||
else
|
||||
{
|
||||
Deselect (event.m_commandInt);
|
||||
return;
|
||||
}
|
||||
ProcessCommand (event);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user