Made various Motif fixes, wxListBox/wxChoice derive from wxControlWithItems,
added release.txt git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -384,14 +384,21 @@ void wxPreviewControlBar::CreateButtons()
|
||||
"120%", "150%", "200%"
|
||||
};
|
||||
|
||||
m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
|
||||
wxPoint(x, y), wxSize(100, -1));
|
||||
|
||||
// Yes, this look stupid, but this is because gcc gives up otherwise.
|
||||
int n = WXSIZEOF(choices);
|
||||
// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now
|
||||
for ( int i = 0; i < n; i++ )
|
||||
m_zoomControl->Append(choices[i]);
|
||||
|
||||
wxString* strings = new wxString[n];
|
||||
int i;
|
||||
for (i = 0; i < n; i++ )
|
||||
strings[i] = choices[i];
|
||||
|
||||
m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
|
||||
wxPoint(x, y),
|
||||
wxSize(100, -1),
|
||||
n,
|
||||
strings
|
||||
);
|
||||
delete[] strings;
|
||||
|
||||
SetZoomControl(m_printPreview->GetZoom());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpext.cpp
|
||||
// Purpose: an external help controller for wxWindows
|
||||
// Name: helpwxht.cpp
|
||||
// Purpose: A help controller using the wxHTML classes
|
||||
// Author: Karsten Ballueder
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# info
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = j:\dev\wx2\wxWindows
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
WXUSINGDLL=0
|
||||
|
||||
|
||||
@@ -477,3 +477,77 @@ void wxChoice::ChangeForegroundColour()
|
||||
for (i = 0; i < m_noStrings; i++)
|
||||
DoChangeForegroundColour(m_widgetList[i], m_foregroundColour);
|
||||
}
|
||||
|
||||
|
||||
// These implement functions needed by wxControlWithItems.
|
||||
// Unfortunately, they're not all implemented yet.
|
||||
|
||||
int wxChoice::GetCount() const
|
||||
{
|
||||
return Number();
|
||||
}
|
||||
|
||||
int wxChoice::DoAppend(const wxString& item)
|
||||
{
|
||||
Append(item);
|
||||
return GetCount() - 1;
|
||||
}
|
||||
|
||||
// Just appends, doesn't yet insert
|
||||
void wxChoice::DoInsertItems(const wxArrayString& items, int WXUNUSED(pos))
|
||||
{
|
||||
size_t nItems = items.GetCount();
|
||||
|
||||
for ( size_t n = 0; n < nItems; n++ )
|
||||
{
|
||||
Append( items[n]);
|
||||
}
|
||||
}
|
||||
|
||||
void wxChoice::DoSetItems(const wxArrayString& items, void **WXUNUSED(clientData))
|
||||
{
|
||||
Clear();
|
||||
size_t nItems = items.GetCount();
|
||||
|
||||
for ( size_t n = 0; n < nItems; n++ )
|
||||
{
|
||||
Append(items[n]);
|
||||
}
|
||||
}
|
||||
|
||||
void wxChoice::DoSetFirstItem(int WXUNUSED(n))
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxChoice::DoSetFirstItem not implemented") );
|
||||
}
|
||||
|
||||
void wxChoice::DoSetItemClientData(int WXUNUSED(n), void* WXUNUSED(clientData))
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxChoice::DoSetItemClientData not implemented") );
|
||||
}
|
||||
|
||||
void* wxChoice::DoGetItemClientData(int WXUNUSED(n)) const
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxChoice::DoGetItemClientData not implemented") );
|
||||
return (void*) NULL;
|
||||
}
|
||||
|
||||
void wxChoice::DoSetItemClientObject(int WXUNUSED(n), wxClientData* WXUNUSED(clientData))
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxChoice::DoSetItemClientObject not implemented") );
|
||||
}
|
||||
|
||||
wxClientData* wxChoice::DoGetItemClientObject(int WXUNUSED(n)) const
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxChoice::DoGetItemClientObject not implemented") );
|
||||
return (wxClientData*) NULL;
|
||||
}
|
||||
|
||||
void wxChoice::Select(int n)
|
||||
{
|
||||
SetSelection(n);
|
||||
}
|
||||
|
||||
void wxChoice::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s))
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxChoice::SetString not implemented") );
|
||||
}
|
||||
|
||||
@@ -786,4 +786,71 @@ void wxListBox::ChangeForegroundColour()
|
||||
*/
|
||||
}
|
||||
|
||||
// These implement functions needed by wxControlWithItems.
|
||||
// Unfortunately, they're not all implemented yet.
|
||||
|
||||
int wxListBox::GetCount() const
|
||||
{
|
||||
return Number();
|
||||
}
|
||||
|
||||
int wxListBox::DoAppend(const wxString& item)
|
||||
{
|
||||
Append(item, (void*) NULL);
|
||||
return GetCount() - 1;
|
||||
}
|
||||
|
||||
// Just appends, doesn't yet insert
|
||||
void wxListBox::DoInsertItems(const wxArrayString& items, int WXUNUSED(pos))
|
||||
{
|
||||
size_t nItems = items.GetCount();
|
||||
|
||||
for ( size_t n = 0; n < nItems; n++ )
|
||||
{
|
||||
Append( items[n], (void*) NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
|
||||
{
|
||||
size_t nItems = items.GetCount();
|
||||
wxString* strings = new wxString[nItems];
|
||||
|
||||
for ( size_t n = 0; n < nItems; n++ )
|
||||
{
|
||||
strings[n] = items[n];
|
||||
}
|
||||
Set(nItems, strings, clientData);
|
||||
|
||||
delete[] strings;
|
||||
}
|
||||
|
||||
void wxListBox::DoSetFirstItem(int WXUNUSED(n))
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxListBox::DoSetFirstItem not implemented") );
|
||||
}
|
||||
|
||||
void wxListBox::DoSetItemClientData(int n, void* clientData)
|
||||
{
|
||||
SetClientData(n, clientData);
|
||||
}
|
||||
|
||||
void* wxListBox::DoGetItemClientData(int n) const
|
||||
{
|
||||
return GetClientData(n);
|
||||
}
|
||||
|
||||
void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
|
||||
{
|
||||
DoSetItemClientData(n, (void*) clientData);
|
||||
}
|
||||
|
||||
wxClientData* wxListBox::DoGetItemClientObject(int n) const
|
||||
{
|
||||
return (wxClientData*) DoGetItemClientData(n);
|
||||
}
|
||||
|
||||
void wxListBox::Select(int n)
|
||||
{
|
||||
SetSelection(n, TRUE);
|
||||
}
|
||||
|
||||
@@ -216,7 +216,8 @@ wxMenuBar::~wxMenuBar()
|
||||
|
||||
void wxMenuBar::EnableTop(size_t WXUNUSED(pos), bool WXUNUSED(flag))
|
||||
{
|
||||
wxFAIL_MSG("TODO");
|
||||
// wxFAIL_MSG("TODO");
|
||||
wxLogWarning("wxMenuBar::EnableTop not yet implemented.");
|
||||
}
|
||||
|
||||
void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
|
||||
@@ -385,6 +386,9 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
|
||||
XtVaSetValues(GetWidget(menu),
|
||||
XmNtearOffModel, XmTEAR_OFF_ENABLED,
|
||||
NULL);
|
||||
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
|
||||
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
|
||||
wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user