MicroWindows tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -182,8 +182,6 @@ ComboboxWidgetsPage::ComboboxWidgetsPage(wxNotebook *notebook,
|
||||
wxImageList *imaglist)
|
||||
: WidgetsPage(notebook)
|
||||
{
|
||||
imaglist->Add(wxBitmap(combobox_xpm));
|
||||
|
||||
// init everything
|
||||
m_chkSort =
|
||||
m_chkReadonly = (wxCheckBox *)NULL;
|
||||
@@ -191,6 +189,8 @@ ComboboxWidgetsPage::ComboboxWidgetsPage(wxNotebook *notebook,
|
||||
m_combobox = (wxComboBox *)NULL;
|
||||
m_sizerCombo = (wxSizer *)NULL;
|
||||
|
||||
imaglist->Add(wxBitmap(combobox_xpm));
|
||||
|
||||
/*
|
||||
What we create here is a frame having 3 panes: style pane is the
|
||||
leftmost one, in the middle the pane with buttons allowing to perform
|
||||
@@ -441,38 +441,49 @@ void ComboboxWidgetsPage::OnButtonAddSeveral(wxCommandEvent& event)
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUICurText(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.SetText( wxString::Format(_T("%d"), m_combobox->GetSelection()) );
|
||||
if (m_combobox)
|
||||
event.SetText( wxString::Format(_T("%d"), m_combobox->GetSelection()) );
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Enable( m_chkSort->GetValue() || m_chkReadonly->GetValue() );
|
||||
if (m_combobox)
|
||||
event.Enable( m_chkSort->GetValue() || m_chkReadonly->GetValue() );
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIDeleteButton(wxUpdateUIEvent& event)
|
||||
{
|
||||
unsigned long n;
|
||||
event.Enable(m_textDelete->GetValue().ToULong(&n) &&
|
||||
(n < (unsigned)m_combobox->GetCount()));
|
||||
if (m_combobox)
|
||||
{
|
||||
unsigned long n;
|
||||
event.Enable(m_textDelete->GetValue().ToULong(&n) &&
|
||||
(n < (unsigned)m_combobox->GetCount()));
|
||||
}
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIDeleteSelButton(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Enable(m_combobox->GetSelection() != -1);
|
||||
if (m_combobox)
|
||||
event.Enable(m_combobox->GetSelection() != -1);
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIClearButton(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Enable(m_combobox->GetCount() != 0);
|
||||
if (m_combobox)
|
||||
event.Enable(m_combobox->GetCount() != 0);
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Enable(!(m_combobox->GetWindowStyle() & wxCB_SORT));
|
||||
if (m_combobox)
|
||||
event.Enable(!(m_combobox->GetWindowStyle() & wxCB_SORT));
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
{
|
||||
if (!m_combobox)
|
||||
return;
|
||||
|
||||
wxString s = event.GetString();
|
||||
|
||||
wxASSERT_MSG( s == m_combobox->GetValue(),
|
||||
|
@@ -355,6 +355,7 @@ void ListboxWidgetsPage::CreateLbox()
|
||||
delete m_lbox;
|
||||
}
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if ( m_chkCheck->GetValue() )
|
||||
{
|
||||
m_lbox = new wxCheckListBox(this, ListboxPage_Listbox,
|
||||
@@ -363,6 +364,7 @@ void ListboxWidgetsPage::CreateLbox()
|
||||
flags);
|
||||
}
|
||||
else // just a listbox
|
||||
#endif
|
||||
{
|
||||
m_lbox = new wxListBox(this, ListboxPage_Listbox,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
|
86
samples/widgets/makefile.mic
Normal file
86
samples/widgets/makefile.mic
Normal file
@@ -0,0 +1,86 @@
|
||||
##############################################################################
|
||||
# Microwindows template Makefile
|
||||
# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
|
||||
##############################################################################
|
||||
|
||||
TOP=$(MICROWINDOWS)
|
||||
ifeq "$(MICROWINDOWS)" ""
|
||||
TOP=/home/julians/local/microwindows/microwindows-0.89pre8/src
|
||||
endif
|
||||
|
||||
CONFIG = $(TOP)/config
|
||||
WXDIR = ../..
|
||||
OBJSUFF = o
|
||||
SRCSUFF = cpp
|
||||
WXLIB=$(WXDIR)/lib/libwx.a
|
||||
AROPTIONS = ruv
|
||||
RANLIB = ranlib
|
||||
RM = rm -f
|
||||
|
||||
ZLIBLIB = $(WXDIR)/lib/libzlib.a
|
||||
PNGLIB = $(WXDIR)/lib/libpng.a
|
||||
JPEGLIB = $(WXDIR)/lib/libjpeg.a
|
||||
TIFFLIB = $(WXDIR)/lib/libtiff.a
|
||||
|
||||
include $(CONFIG)
|
||||
|
||||
######################## Additional Flags section ############################
|
||||
|
||||
# Directories list for header files
|
||||
INCLUDEDIRS += -I$(WXDIR)/include
|
||||
# Defines for preprocessor
|
||||
DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
|
||||
|
||||
# Compilation flags for C files OTHER than include directories
|
||||
CFLAGS +=
|
||||
# Preprocessor flags OTHER than defines
|
||||
CPPFLAGS +=
|
||||
# Linking flags
|
||||
#LDFLAGS += -lwx -L$(WXDIR)/lib
|
||||
LDFLAGS += $(WXLIB)
|
||||
|
||||
############################# targets section ################################
|
||||
|
||||
# If you want to create a library with the objects files, define the name here
|
||||
LIBNAME =
|
||||
|
||||
# If we put it below OBJS=, Makefile.rules includes .depend
|
||||
# and it continually looks for .c files to satisfy .o.cpp
|
||||
# dependency. What's going on there?
|
||||
include $(TOP)/Makefile.rules
|
||||
|
||||
# List of objects to compile
|
||||
OBJS = button.o combobox.o gauge.o listbox.o notebook.o radiobox.o slider.o spinbtn.o \
|
||||
static.o textctrl.o widgets.o
|
||||
|
||||
all: widgets
|
||||
|
||||
######################### Makefile.rules section #############################
|
||||
|
||||
|
||||
|
||||
######################## Tools targets section ###############################
|
||||
|
||||
widgets: $(OBJS) $(MWINLIBS) $(WXLIB) $(TOP)/config
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(WXLIB) $(MWINLIBS) -lm
|
||||
|
||||
#.SUFFIXES: .cpp .cxx .c
|
||||
|
||||
#.c.o:
|
||||
# $(CC) -c $(CFLAGS) $(CFLAGS) -o $@ $*.c
|
||||
|
||||
.cxx.o:
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cxx
|
||||
|
||||
.cpp.o:
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cpp
|
||||
|
||||
cleanwx:
|
||||
-$(RM) *.o
|
||||
-$(RM) widgets
|
||||
|
||||
wx:
|
||||
@pushd $(WXDIR)/src/msw; make -f makefile.mic all; popd
|
||||
|
||||
wxfull:
|
||||
@pushd $(WXDIR)/src/msw; make -f makefile.mic cleanwx all; popd
|
Reference in New Issue
Block a user