Added new wxFontDialog,
Added PICFLAGS to parser compilation, Implemented COL_CLICK and wxLC_NO_HEADER git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
799a341cc3
commit
8636aed896
@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file was automatically generated by tmake at 12:57, 1999/08/23
|
||||
# This file was automatically generated by tmake at 19:37, 1999/08/24
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
|
||||
|
||||
#
|
||||
@ -330,6 +330,7 @@ GTK_HEADERS = \
|
||||
gtk/dnd.h \
|
||||
gtk/filedlg.h \
|
||||
gtk/font.h \
|
||||
gtk/fontdlg.h \
|
||||
gtk/frame.h \
|
||||
gtk/gauge.h \
|
||||
gtk/gdiobj.h \
|
||||
@ -572,7 +573,6 @@ GTK_GENERICOBJS = \
|
||||
dcpsg.o \
|
||||
dirdlgg.o \
|
||||
filedlgg.o \
|
||||
fontdlgg.o \
|
||||
gridg.o \
|
||||
helphtml.o \
|
||||
helpwxht.o \
|
||||
@ -605,7 +605,6 @@ GTK_GENERICDEPS = \
|
||||
dcpsg.d \
|
||||
dirdlgg.d \
|
||||
filedlgg.d \
|
||||
fontdlgg.d \
|
||||
gridg.d \
|
||||
helphtml.d \
|
||||
helpwxht.d \
|
||||
@ -820,6 +819,7 @@ GTK_GUIOBJS = \
|
||||
dialog.o \
|
||||
dnd.o \
|
||||
font.o \
|
||||
fontdlg.o \
|
||||
frame.o \
|
||||
gauge.o \
|
||||
gdiobj.o \
|
||||
@ -878,6 +878,7 @@ GTK_GUIDEPS = \
|
||||
dialog.d \
|
||||
dnd.d \
|
||||
font.d \
|
||||
fontdlg.d \
|
||||
frame.d \
|
||||
gauge.d \
|
||||
gdiobj.d \
|
||||
@ -1809,7 +1810,7 @@ CREATE_INSTALLED_LINKS: $(libdir)/@WX_TARGET_LIBRARY@
|
||||
$(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
|
||||
|
||||
parser.o: parser.c lexer.c
|
||||
$(CCLEX) -c $(CFLAGS) -o $@ parser.c
|
||||
$(CCLEX) -c $(CFLAGS) $(PICFLAGS) -o $@ parser.c
|
||||
|
||||
parser.c: $(COMMDIR)/parser.y lexer.c
|
||||
$(YACC) $(COMMDIR)/parser.y
|
||||
|
@ -1301,6 +1301,8 @@ SEARCH_INCLUDE="\
|
||||
\
|
||||
/usr/include/Motif1.2 \
|
||||
/opt/xpm/include/X11 \
|
||||
/opt/GBxpm/include/ \
|
||||
/opt/GBxpm/X11/include/ \
|
||||
\
|
||||
/usr/Motif1.2/include \
|
||||
/usr/dt/include \
|
||||
|
@ -57,7 +57,7 @@ choicdgg.cpp G
|
||||
colrdlgg.cpp G G
|
||||
dcpsg.cpp G U
|
||||
dirdlgg.cpp G 16
|
||||
fontdlgg.cpp G G
|
||||
fontdlgg.cpp G G,R
|
||||
filedlgg.cpp G U,X
|
||||
gridg.cpp G
|
||||
helphtml.cpp G G
|
||||
@ -294,6 +294,7 @@ dcscreen.cpp R
|
||||
dialog.cpp R
|
||||
dnd.cpp R
|
||||
font.cpp R
|
||||
fontdlg.cpp R
|
||||
frame.cpp R
|
||||
gauge.cpp R
|
||||
gdiobj.cpp R
|
||||
@ -601,6 +602,7 @@ dialog.h K
|
||||
dnd.h K
|
||||
filedlg.h K
|
||||
font.h K
|
||||
fontdlg.h K
|
||||
frame.h K
|
||||
gauge.h K
|
||||
gdiobj.h K
|
||||
|
@ -512,7 +512,7 @@ CREATE_INSTALLED_LINKS: $(libdir)/@WX_TARGET_LIBRARY@
|
||||
$(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
|
||||
|
||||
parser.o: parser.c lexer.c
|
||||
$(CCLEX) -c $(CFLAGS) -o $@ parser.c
|
||||
$(CCLEX) -c $(CFLAGS) $(PICFLAGS) -o $@ parser.c
|
||||
|
||||
parser.c: $(COMMDIR)/parser.y lexer.c
|
||||
$(YACC) $(COMMDIR)/parser.y
|
||||
|
@ -8,9 +8,7 @@
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#include "wx/gtk/fontdlg.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
|
@ -71,7 +71,7 @@ typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData);
|
||||
#define wxLC_AUTOARRANGE 0x0100 // not supported in wxGLC
|
||||
#define wxLC_USER_TEXT 0x0200 // not supported in wxGLC (how does it work?)
|
||||
#define wxLC_EDIT_LABELS 0x0400
|
||||
#define wxLC_NO_HEADER 0x0800 // not supported in wxGLC
|
||||
#define wxLC_NO_HEADER 0x0800
|
||||
#define wxLC_NO_SORT_HEADER 0x1000 // not supported in wxGLC
|
||||
#define wxLC_SINGLE_SEL 0x2000
|
||||
#define wxLC_SORT_ASCENDING 0x4000
|
||||
|
@ -79,9 +79,7 @@ class wxAcceleratorEntry: public wxObject
|
||||
|
||||
class wxAcceleratorTable: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
|
||||
public:
|
||||
public:
|
||||
wxAcceleratorTable();
|
||||
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
||||
~wxAcceleratorTable();
|
||||
@ -99,10 +97,12 @@ class wxAcceleratorTable: public wxObject
|
||||
|
||||
bool Ok() const;
|
||||
|
||||
// private:
|
||||
// implementation
|
||||
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -30,8 +30,6 @@ class wxLog;
|
||||
|
||||
class wxApp: public wxAppBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
|
||||
public:
|
||||
wxApp();
|
||||
~wxApp();
|
||||
@ -82,6 +80,7 @@ private:
|
||||
/// Set to TRUE while we are in wxYield().
|
||||
bool m_suppressIdleEvents;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@ -33,23 +33,24 @@ class wxBitmap;
|
||||
|
||||
class wxMask: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
|
||||
public:
|
||||
wxMask();
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
~wxMask();
|
||||
wxMask();
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
~wxMask();
|
||||
|
||||
bool Create( const wxBitmap& bitmap, const wxColour& colour );
|
||||
bool Create( const wxBitmap& bitmap, int paletteIndex );
|
||||
bool Create( const wxBitmap& bitmap );
|
||||
bool Create( const wxBitmap& bitmap, const wxColour& colour );
|
||||
bool Create( const wxBitmap& bitmap, int paletteIndex );
|
||||
bool Create( const wxBitmap& bitmap );
|
||||
|
||||
// implementation
|
||||
|
||||
GdkBitmap *m_bitmap;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
// implementation
|
||||
GdkBitmap *m_bitmap;
|
||||
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -58,47 +59,48 @@ public:
|
||||
|
||||
class wxBitmap: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
|
||||
public:
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp );
|
||||
bool operator != ( const wxBitmap& bmp );
|
||||
bool Ok() const;
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp );
|
||||
bool operator != ( const wxBitmap& bmp );
|
||||
bool Ok() const;
|
||||
|
||||
int GetHeight() const;
|
||||
int GetWidth() const;
|
||||
int GetDepth() const;
|
||||
int GetHeight() const;
|
||||
int GetWidth() const;
|
||||
int GetDepth() const;
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
|
||||
bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
|
||||
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
|
||||
bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
|
||||
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
|
||||
|
||||
wxPalette *GetPalette() const;
|
||||
wxPalette *GetColourMap() const
|
||||
wxPalette *GetPalette() const;
|
||||
wxPalette *GetColourMap() const
|
||||
{ return GetPalette(); };
|
||||
|
||||
// implementation
|
||||
// implementation
|
||||
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
void SetPixmap( GdkPixmap *pixmap );
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
void SetPixmap( GdkPixmap *pixmap );
|
||||
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
// no data :-)
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
||||
#endif // __GTKBITMAPH__
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
|
||||
// implementation
|
||||
|
||||
wxFont( char *xFontName );
|
||||
wxFont( GdkFont* font, char *xFontName );
|
||||
void Unshare();
|
||||
|
||||
GdkFont* GetInternalFont(float scale = 1.0) const;
|
||||
|
@ -79,9 +79,7 @@ class wxAcceleratorEntry: public wxObject
|
||||
|
||||
class wxAcceleratorTable: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
|
||||
public:
|
||||
public:
|
||||
wxAcceleratorTable();
|
||||
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
||||
~wxAcceleratorTable();
|
||||
@ -99,10 +97,12 @@ class wxAcceleratorTable: public wxObject
|
||||
|
||||
bool Ok() const;
|
||||
|
||||
// private:
|
||||
// implementation
|
||||
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -30,8 +30,6 @@ class wxLog;
|
||||
|
||||
class wxApp: public wxAppBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
|
||||
public:
|
||||
wxApp();
|
||||
~wxApp();
|
||||
@ -82,6 +80,7 @@ private:
|
||||
/// Set to TRUE while we are in wxYield().
|
||||
bool m_suppressIdleEvents;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@ -33,23 +33,24 @@ class wxBitmap;
|
||||
|
||||
class wxMask: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
|
||||
public:
|
||||
wxMask();
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
~wxMask();
|
||||
wxMask();
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
~wxMask();
|
||||
|
||||
bool Create( const wxBitmap& bitmap, const wxColour& colour );
|
||||
bool Create( const wxBitmap& bitmap, int paletteIndex );
|
||||
bool Create( const wxBitmap& bitmap );
|
||||
bool Create( const wxBitmap& bitmap, const wxColour& colour );
|
||||
bool Create( const wxBitmap& bitmap, int paletteIndex );
|
||||
bool Create( const wxBitmap& bitmap );
|
||||
|
||||
// implementation
|
||||
|
||||
GdkBitmap *m_bitmap;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
// implementation
|
||||
GdkBitmap *m_bitmap;
|
||||
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -58,47 +59,48 @@ public:
|
||||
|
||||
class wxBitmap: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
|
||||
public:
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp );
|
||||
bool operator != ( const wxBitmap& bmp );
|
||||
bool Ok() const;
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp );
|
||||
bool operator != ( const wxBitmap& bmp );
|
||||
bool Ok() const;
|
||||
|
||||
int GetHeight() const;
|
||||
int GetWidth() const;
|
||||
int GetDepth() const;
|
||||
int GetHeight() const;
|
||||
int GetWidth() const;
|
||||
int GetDepth() const;
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
|
||||
bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
|
||||
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
|
||||
bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
|
||||
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
|
||||
|
||||
wxPalette *GetPalette() const;
|
||||
wxPalette *GetColourMap() const
|
||||
wxPalette *GetPalette() const;
|
||||
wxPalette *GetColourMap() const
|
||||
{ return GetPalette(); };
|
||||
|
||||
// implementation
|
||||
// implementation
|
||||
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
void SetPixmap( GdkPixmap *pixmap );
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
void SetPixmap( GdkPixmap *pixmap );
|
||||
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
// no data :-)
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
||||
#endif // __GTKBITMAPH__
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
|
||||
// implementation
|
||||
|
||||
wxFont( char *xFontName );
|
||||
wxFont( GdkFont* font, char *xFontName );
|
||||
void Unshare();
|
||||
|
||||
GdkFont* GetInternalFont(float scale = 1.0) const;
|
||||
|
@ -60,6 +60,7 @@ BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
|
||||
EVT_LIST_ITEM_DESELECTED(LIST_CTRL, MyListCtrl::OnDeselected)
|
||||
EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
|
||||
EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated)
|
||||
EVT_LIST_COL_CLICK(LIST_CTRL, MyListCtrl::OnColClick)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
@ -146,7 +147,7 @@ bool MyApp::OnInit(void)
|
||||
|
||||
// Make a panel with a message
|
||||
frame->m_listCtrl = new MyListCtrl(frame, LIST_CTRL, wxPoint(0, 0), wxSize(400, 200),
|
||||
wxLC_LIST|wxSUNKEN_BORDER|wxLC_EDIT_LABELS);
|
||||
wxLC_LIST|wxSUNKEN_BORDER|wxLC_EDIT_LABELS );
|
||||
// wxLC_LIST|wxLC_USER_TEXT|wxSUNKEN_BORDER); // wxLC_USER_TEXT requires app to supply all text on demand
|
||||
frame->m_logWindow = new wxTextCtrl(frame, -1, "", wxPoint(0, 0), wxSize(400, 200), wxTE_MULTILINE|wxSUNKEN_BORDER);
|
||||
|
||||
@ -353,6 +354,20 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
// MyListCtrl
|
||||
|
||||
void MyListCtrl::OnColClick(wxListEvent& event)
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
|
||||
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||
if ( !text )
|
||||
return;
|
||||
|
||||
wxString msg;
|
||||
msg.Printf( "OnColumnClick at %d.\n", event.GetColumn() );
|
||||
text->WriteText(msg);
|
||||
}
|
||||
|
||||
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
@ -406,10 +421,7 @@ void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
||||
|
||||
text->WriteText("OnEndLabelEdit: ");
|
||||
text->WriteText(event.m_item.m_text);
|
||||
if (event.m_cancelled)
|
||||
text->WriteText(" cancelled by user\n");
|
||||
else
|
||||
text->WriteText(" accepted by user\n");
|
||||
text->WriteText("\n");
|
||||
}
|
||||
|
||||
void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event))
|
||||
|
@ -26,7 +26,8 @@ public:
|
||||
wxListCtrl(parent, id, pos, size, style)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void OnColClick(wxListEvent& event);
|
||||
void OnBeginDrag(wxListEvent& event);
|
||||
void OnBeginRDrag(wxListEvent& event);
|
||||
void OnBeginLabelEdit(wxListEvent& event);
|
||||
|
@ -875,22 +875,37 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
|
||||
for (int j = 0; j < m_owner->GetColumnCount(); j++)
|
||||
{
|
||||
xpos += m_owner->GetColumnWidth( j );
|
||||
m_column = j;
|
||||
if ((abs(x-xpos) < 3) && (y < 22))
|
||||
{
|
||||
hit_border = TRUE;
|
||||
m_column = j;
|
||||
break;
|
||||
}
|
||||
if (x-xpos < 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
m_minX = xpos;
|
||||
}
|
||||
|
||||
if (event.LeftDown() && hit_border)
|
||||
if (event.LeftDown())
|
||||
{
|
||||
m_isDragging = TRUE;
|
||||
m_currentX = x;
|
||||
DrawCurrent();
|
||||
CaptureMouse();
|
||||
return;
|
||||
if (hit_border)
|
||||
{
|
||||
m_isDragging = TRUE;
|
||||
m_currentX = x;
|
||||
DrawCurrent();
|
||||
CaptureMouse();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_COL_CLICK, GetParent()->GetId() );
|
||||
le.SetEventObject( GetParent() );
|
||||
le.m_col = m_column;
|
||||
GetParent()->GetEventHandler()->ProcessEvent( le );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.Moving())
|
||||
@ -2570,16 +2585,21 @@ void wxListCtrl::SetWindowStyleFlag( long flag )
|
||||
{
|
||||
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin,
|
||||
wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
|
||||
if (HasFlag(wxLC_NO_HEADER))
|
||||
m_headerWin->Show( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_headerWin->Show( TRUE );
|
||||
if (flag & wxLC_NO_HEADER)
|
||||
m_headerWin->Show( FALSE );
|
||||
else
|
||||
m_headerWin->Show( TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (HasFlag(wxLC_REPORT))
|
||||
if (HasFlag(wxLC_REPORT) && !(HasFlag(wxLC_NO_HEADER)))
|
||||
{
|
||||
m_headerWin->Show( FALSE );
|
||||
}
|
||||
@ -2943,7 +2963,7 @@ void wxListCtrl::OnIdle( wxIdleEvent &WXUNUSED(event) )
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
|
||||
if (HasFlag(wxLC_REPORT))
|
||||
if (HasFlag(wxLC_REPORT) && !HasFlag(wxLC_NO_HEADER))
|
||||
{
|
||||
m_headerWin->GetPosition( &x, &y );
|
||||
m_headerWin->GetSize( &w, &h );
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "wx/utils.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/tokenzr.h"
|
||||
#include <strings.h>
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
@ -99,14 +100,49 @@ wxFont::wxFont()
|
||||
if (wxTheFontList) wxTheFontList->Append( this );
|
||||
}
|
||||
|
||||
wxFont::wxFont( char *xFontName )
|
||||
wxFont::wxFont( GdkFont *font, char *xFontName )
|
||||
{
|
||||
if (!xFontName) return;
|
||||
|
||||
m_refData = new wxFontRefData();
|
||||
|
||||
M_FONTDATA->m_byXFontName = TRUE;
|
||||
M_FONTDATA->m_font = gdk_font_load( xFontName );
|
||||
// M_FONTDATA->m_byXFontName = TRUE;
|
||||
M_FONTDATA->m_font = font;
|
||||
|
||||
wxString tmp;
|
||||
|
||||
wxString fontname( xFontName );
|
||||
wxStringTokenizer tn( fontname, _T("-") );
|
||||
|
||||
tn.GetNextToken(); // foundry
|
||||
|
||||
M_FONTDATA->m_faceName = tn.GetNextToken(); // courier
|
||||
|
||||
tmp = tn.GetNextToken().MakeUpper();
|
||||
if (tmp == _T("BOLD")) M_FONTDATA->m_weight = wxBOLD;
|
||||
|
||||
tmp = tn.GetNextToken().MakeUpper();
|
||||
if (tmp == _T("I")) M_FONTDATA->m_style = wxITALIC;
|
||||
if (tmp == _T("O")) M_FONTDATA->m_style = wxITALIC;
|
||||
|
||||
tn.GetNextToken(); // set width
|
||||
tn.GetNextToken(); // ?
|
||||
tn.GetNextToken(); // pixel size
|
||||
|
||||
tmp = tn.GetNextToken(); // pointsize
|
||||
int num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
|
||||
M_FONTDATA->m_pointSize = num / 10;
|
||||
|
||||
tn.GetNextToken(); // x-res
|
||||
tn.GetNextToken(); // y-res
|
||||
|
||||
tmp = tn.GetNextToken().MakeUpper();
|
||||
if (tmp == _T("M")) M_FONTDATA->m_family = wxMODERN;
|
||||
else if (M_FONTDATA->m_faceName == _T("TIMES")) M_FONTDATA->m_family = wxROMAN;
|
||||
else if (M_FONTDATA->m_faceName == _T("HELVETICA")) M_FONTDATA->m_family = wxSWISS;
|
||||
else if (M_FONTDATA->m_faceName == _T("LUCIDATYPEWRITER")) M_FONTDATA->m_family = wxTELETYPE;
|
||||
else if (M_FONTDATA->m_faceName == _T("LUCIDA")) M_FONTDATA->m_family = wxDECORATIVE;
|
||||
else if (M_FONTDATA->m_faceName == _T("UTOPIA")) M_FONTDATA->m_family = wxSCRIPT;
|
||||
}
|
||||
|
||||
wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined, const wxString& face )
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "wx/utils.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/tokenzr.h"
|
||||
#include <strings.h>
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
@ -99,14 +100,49 @@ wxFont::wxFont()
|
||||
if (wxTheFontList) wxTheFontList->Append( this );
|
||||
}
|
||||
|
||||
wxFont::wxFont( char *xFontName )
|
||||
wxFont::wxFont( GdkFont *font, char *xFontName )
|
||||
{
|
||||
if (!xFontName) return;
|
||||
|
||||
m_refData = new wxFontRefData();
|
||||
|
||||
M_FONTDATA->m_byXFontName = TRUE;
|
||||
M_FONTDATA->m_font = gdk_font_load( xFontName );
|
||||
// M_FONTDATA->m_byXFontName = TRUE;
|
||||
M_FONTDATA->m_font = font;
|
||||
|
||||
wxString tmp;
|
||||
|
||||
wxString fontname( xFontName );
|
||||
wxStringTokenizer tn( fontname, _T("-") );
|
||||
|
||||
tn.GetNextToken(); // foundry
|
||||
|
||||
M_FONTDATA->m_faceName = tn.GetNextToken(); // courier
|
||||
|
||||
tmp = tn.GetNextToken().MakeUpper();
|
||||
if (tmp == _T("BOLD")) M_FONTDATA->m_weight = wxBOLD;
|
||||
|
||||
tmp = tn.GetNextToken().MakeUpper();
|
||||
if (tmp == _T("I")) M_FONTDATA->m_style = wxITALIC;
|
||||
if (tmp == _T("O")) M_FONTDATA->m_style = wxITALIC;
|
||||
|
||||
tn.GetNextToken(); // set width
|
||||
tn.GetNextToken(); // ?
|
||||
tn.GetNextToken(); // pixel size
|
||||
|
||||
tmp = tn.GetNextToken(); // pointsize
|
||||
int num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
|
||||
M_FONTDATA->m_pointSize = num / 10;
|
||||
|
||||
tn.GetNextToken(); // x-res
|
||||
tn.GetNextToken(); // y-res
|
||||
|
||||
tmp = tn.GetNextToken().MakeUpper();
|
||||
if (tmp == _T("M")) M_FONTDATA->m_family = wxMODERN;
|
||||
else if (M_FONTDATA->m_faceName == _T("TIMES")) M_FONTDATA->m_family = wxROMAN;
|
||||
else if (M_FONTDATA->m_faceName == _T("HELVETICA")) M_FONTDATA->m_family = wxSWISS;
|
||||
else if (M_FONTDATA->m_faceName == _T("LUCIDATYPEWRITER")) M_FONTDATA->m_family = wxTELETYPE;
|
||||
else if (M_FONTDATA->m_faceName == _T("LUCIDA")) M_FONTDATA->m_family = wxDECORATIVE;
|
||||
else if (M_FONTDATA->m_faceName == _T("UTOPIA")) M_FONTDATA->m_family = wxSCRIPT;
|
||||
}
|
||||
|
||||
wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined, const wxString& face )
|
||||
|
Loading…
Reference in New Issue
Block a user