#ifdef __cplusplus
extern "C" {
char *proio_cons(char *, char *);
-char * make_integer(char *);
-char * make_word(char *);
-char * make_string(char *);
-char * make_real(char *, char *);
-char * make_exp(char *, char *);
-char * make_exp2(char *, char *, char*);
+char * wxmake_integer(char *);
+char * wxmake_word(char *);
+char * wxmake_string(char *);
+char * wxmake_real(char *, char *);
+char * wxmake_exp(char *, char *);
+char * wxmake_exp2(char *, char *, char*);
void add_expr(char *);
void process_command(char *);
void syntax_error(char *);
#else
#if __BORLANDC__
char *proio_cons(char *, char *);
-char * make_integer(char *);
-char * make_word(char *);
-char * make_string(char *);
-char * make_real(char *, char *);
-char * make_exp(char *, char *);
-char * make_exp2(char *, char *, char*);
+char * wxmake_integer(char *);
+char * wxmake_word(char *);
+char * wxmake_string(char *);
+char * wxmake_real(char *, char *);
+char * wxmake_exp(char *, char *);
+char * wxmake_exp2(char *, char *, char*);
void add_expr(char *);
void process_command(char *);
void syntax_error(char *);
#else
char *proio_cons();
-char * make_integer();
-char * make_word();
-char * make_string();
-char * make_real();
-char * make_exp();
-char * make_exp2();
+char * wxmake_integer();
+char * wxmake_word();
+char * wxmake_string();
+char * wxmake_real();
+char * wxmake_exp();
+char * wxmake_exp2();
void add_expr();
void process_command();
virtual void OnEnter() { }
virtual void OnLeave() { }
+ virtual void OnMouseMove( long WXUNUSED(x), long WXUNUSED(y) ) { }
virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0;
// Override these to indicate what kind of data you support:
virtual void OnEnter() { }
virtual void OnLeave() { }
+ virtual void OnMouseMove( long WXUNUSED(x), long WXUNUSED(y) ) { }
virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0;
// Override these to indicate what kind of data you support:
void OnSize( wxSizeEvent& event );
void OnListBox( wxCommandEvent &event );
+ void OnListBoxDoubleClick( wxCommandEvent &event );
void OnListBoxButtons( wxCommandEvent &event );
void OnChoice( wxCommandEvent &event );
void OnChoiceButtons( wxCommandEvent &event );
EVT_SIZE ( MyPanel::OnSize)
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, MyPanel::OnPageChanged)
EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox)
+ EVT_LISTBOX_DCLICK(ID_LISTBOX, MyPanel::OnListBoxDoubleClick)
EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_SEL_STR, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons)
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) )
{
- SetBackgroundColour("cadet blue");
+// SetBackgroundColour("cadet blue");
m_text = new wxTextCtrl( this, -1, "This is the log window.\n", wxPoint(0,50), wxSize(100,50), wxTE_MULTILINE );
- m_text->SetBackgroundColour("wheat");
+// m_text->SetBackgroundColour("wheat");
m_notebook = new wxNotebook( this, ID_NOTEBOOK, wxPoint(0,0), wxSize(200,150) );
wxButton *button = (wxButton*)NULL;
- m_notebook->SetBackgroundColour("cadet blue");
+// m_notebook->SetBackgroundColour("cadet blue");
wxPanel *panel = (wxPanel*) NULL;
panel = new wxPanel(m_notebook);
- panel->SetBackgroundColour("cadet blue");
- panel->SetForegroundColour("blue");
+// panel->SetBackgroundColour("cadet blue");
+// panel->SetForegroundColour("blue");
m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), 5, choices );
- m_listbox->SetBackgroundColour("wheat");
+// m_listbox->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_LISTBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_APPEND, "Append 'Hi!'", wxPoint(340,80), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) );
button = new wxButton( panel, ID_LISTBOX_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
- button->SetForegroundColour( "red" );
+// button->SetForegroundColour( "red" );
m_checkbox = new wxCheckBox( panel, ID_LISTBOX_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
m_checkbox->SetValue(FALSE);
m_notebook->AddPage(panel, "wxList", FALSE, Image_List);
panel = new wxPanel(m_notebook);
- panel->SetBackgroundColour("cadet blue");
- panel->SetForegroundColour("blue");
+// panel->SetBackgroundColour("cadet blue");
+// panel->SetForegroundColour("blue");
m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices );
- m_choice->SetBackgroundColour("wheat");
+// m_choice->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_CHOICE_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
(void)new wxButton( panel, ID_CHOICE_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
panel = new wxPanel(m_notebook);
- panel->SetBackgroundColour("cadet blue");
- panel->SetForegroundColour("blue");
+// panel->SetBackgroundColour("cadet blue");
+// panel->SetForegroundColour("blue");
m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices );
- m_combo->SetBackgroundColour("wheat");
+// m_combo->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo);
panel = new wxPanel(m_notebook);
- panel->SetBackgroundColour("cadet blue");
- panel->SetForegroundColour("blue");
+// panel->SetBackgroundColour("cadet blue");
+// panel->SetForegroundColour("blue");
wxTextCtrl *tc = new wxTextCtrl( panel, ID_TEXT, "Write text here.", wxPoint(10,10), wxSize(320,28));
(*tc) << " More text.";
- tc->SetBackgroundColour("wheat");
+// tc->SetBackgroundColour("wheat");
m_multitext = new wxTextCtrl( panel, ID_TEXT, "And here.", wxPoint(10,50), wxSize(320,160), wxTE_MULTILINE );
(*m_multitext) << " More text.";
m_multitext->SetBackgroundColour("wheat");
};
panel = new wxPanel(m_notebook);
- panel->SetBackgroundColour("cadet blue");
- panel->SetForegroundColour("blue");
+// panel->SetBackgroundColour("cadet blue");
+// panel->SetForegroundColour("blue");
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "That", wxPoint(10,160), wxSize(-1,-1), 2, choices2, 1, wxRA_SPECIFY_ROWS );
- m_radio->SetBackgroundColour("wheat");
+// m_radio->SetBackgroundColour("wheat");
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 5, choices, 1, wxRA_SPECIFY_COLS );
- m_radio->SetBackgroundColour("wheat");
+// m_radio->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_RADIOBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "Select 'This'", wxPoint(180,80), wxSize(140,30) );
m_fontButton = new wxButton( panel, ID_SET_FONT, "Set more Italic font", wxPoint(340,30), wxSize(140,30) );
- m_fontButton->SetForegroundColour("blue");
+// m_fontButton->SetForegroundColour("blue");
(void)new wxButton( panel, ID_RADIOBOX_FONT, "Set Italic font", wxPoint(340,80), wxSize(140,30) );
(void)new wxCheckBox( panel, ID_RADIOBOX_ENABLE, "Disable", wxPoint(340,130), wxSize(140,30) );
wxRadioButton *rb = new wxRadioButton( panel, ID_RADIOBUTTON_1, "Radiobutton1", wxPoint(210,170), wxSize(110,30) );
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
panel = new wxPanel(m_notebook);
- panel->SetBackgroundColour("cadet blue");
- panel->SetForegroundColour("blue");
+// panel->SetBackgroundColour("cadet blue");
+// panel->SetForegroundColour("blue");
(void)new wxStaticBox( panel, -1, "wxGauge and wxSlider", wxPoint(10,10), wxSize(180,130) );
m_gauge = new wxGauge( panel, -1, 200, wxPoint(18,50), wxSize(155,-1) );
- m_gauge->SetBackgroundColour("wheat");
+// m_gauge->SetBackgroundColour("wheat");
m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1) );
- m_slider->SetBackgroundColour("wheat");
+// m_slider->SetBackgroundColour("wheat");
(void)new wxStaticBox( panel, -1, "Explanation", wxPoint(200,10), wxSize(290,130) );
(void)new wxStaticText( panel, -1,
"In order see the gauge (aka progress bar)\n"
#endif
);
m_spintext = new wxTextCtrl( panel, -1, "0", wxPoint(20,160), wxSize(80,-1) );
- m_spintext->SetBackgroundColour("wheat");
+// m_spintext->SetBackgroundColour("wheat");
m_spinbutton = new wxSpinButton( panel, ID_SPIN, wxPoint(103,159), wxSize(-1,-1) );
- m_spinbutton->SetBackgroundColour("wheat");
+// m_spinbutton->SetBackgroundColour("wheat");
m_spinbutton->SetRange(0,100);
m_notebook->AddPage(panel, "wxGauge", FALSE, Image_Gauge);
m_text->WriteText( "\n" );
}
+void MyPanel::OnListBoxDoubleClick( wxCommandEvent &event )
+{
+ m_text->WriteText( "ListBox double click string is: " );
+ m_text->WriteText( event.GetString() );
+ m_text->WriteText( "\n" );
+}
+
void MyPanel::OnListBoxButtons( wxCommandEvent &event )
{
switch (event.GetId())
#include "db.xpm"
#endif
-#include <stdio.h> // Included strictly for reading the text file with the database parameters
+#include <stdio.h> /* Included strictly for reading the text file with the database parameters */
-#include <wx/db.h> // Required in the file which will get the data source connection
-#include <wx/dbtable.h> // Has the wxTable object from which all data objects will inherit their data table functionality
+#include <wx/db.h> /* Required in the file which will get the data source connection */
+#include <wx/dbtable.h> /* Has the wxTable object from which all data objects will inherit their data table functionality */
-extern DbList* WXDLLEXPORT PtrBegDbList; // from db.cpp, used in getting back error results from db connections
+extern DbList* WXDLLEXPORT PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */
-#include "dbtest.h" // Header file for this demonstration program
-#include "listdb.h" // Code to support the "Lookup" button on the editor dialog
+#include "dbtest.h" /* Header file for this demonstration program */
+#include "listdb.h" /* Code to support the "Lookup" button on the editor dialog */
IMPLEMENT_APP(DatabaseDemoApp)
-extern char ListDB_Selection[]; // Used to return the first column value for the selected line from the listDB routines
-extern char ListDB_Selection2[]; // Used to return the second column value for the selected line from the listDB routines
-
-DatabaseDemoFrame *DemoFrame; // Pointer to the main frame
+extern char ListDB_Selection[]; /* Used to return the first column value for the selected line from the listDB routines */
+extern char ListDB_Selection2[]; /* Used to return the second column value for the selected line from the listDB routines */
+DatabaseDemoFrame *DemoFrame; /* Pointer to the main frame */
/* Pointer to the main database connection used in the program. This
* pointer would normally be used for doing things as database lookups
* table object which will do a CommitTrans() or RollbackTrans() that a
* new wxDB object be created and used for it.
*/
+
wxDB *READONLY_DB;
-
/*
* This function will return the exact string(s) from the database engine
* indicating all error conditions which have just occured during the
* NOTE: The value returned by this function is for temporary use only and
* should be copied for long term use
*/
+
char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine)
{
static wxString msg;
if (ErrFile || ErrLine)
{
- msg += "\n";
- msg.Append ('-',80);
- msg += "\nFile: ";
+ msg += "File: ";
msg += ErrFile;
msg += " Line: ";
tStr.Printf("%d",ErrLine);
msg += "\n";
}
- msg.Append ('-',80);
- msg.Append ("\nODBC ERRORS\n");
- msg.Append ('-',80);
+ msg.Append ("\nODBC errors:\n");
msg += "\n";
- // Scan through each database connection displaying
- // any ODBC errors that have occured.
+
+ /* Scan through each database connection displaying
+ * any ODBC errors that have occured. */
for (DbList *pDbList = PtrBegDbList; pDbList; pDbList = pDbList->PtrNext)
{
// Skip over any free connections
// Build the dialog
- wxStaticBox *FunctionGrp = new wxStaticBox(this, EDITOR_DIALOG_FN_GROUP, "", wxPoint(15, 1), wxSize(497, 69), 0, "FunctionGrp");
- wxStaticBox *SearchGrp = new wxStaticBox(this, EDITOR_DIALOG_SEARCH_GROUP, "", wxPoint(417, 1), wxSize(95, 242), 0, "SearchGrp");
+ (void)new wxStaticBox(this, EDITOR_DIALOG_FN_GROUP, "", wxPoint(15, 1), wxSize(497, 69), 0, "FunctionGrp");
+ (void)new wxStaticBox(this, EDITOR_DIALOG_SEARCH_GROUP, "", wxPoint(417, 1), wxSize(95, 242), 0, "SearchGrp");
pCreateBtn = new wxButton(this, EDITOR_DIALOG_CREATE, "&Create", wxPoint(25, 21), wxSize(70, 35), 0, wxDefaultValidator, "CreateBtn");
pEditBtn = new wxButton(this, EDITOR_DIALOG_EDIT, "&Edit", wxPoint(102, 21), wxSize(70, 35), 0, wxDefaultValidator, "EditBtn");
// The constructed where clause below has a sub-query within it "SELECT MIN(NAME) FROM %s"
// to achieve a single row (in this case the first name in alphabetical order).
- Contact->whereStr.Printf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->tableName);
+ Contact->whereStr.Printf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->tableName);
// NOTE: (const char*) returns a pointer which may not be valid later, so this is short term use only
Contact->where = (char*) (const char*) Contact->whereStr;
char ListDB_Selection2[LOOKUP_COL_LEN+1];
// Constants
-const LISTDB_NO_SPACES_BETWEEN_COLS = 3;
+const int LISTDB_NO_SPACES_BETWEEN_COLS = 3;
// Clookup constructor
#include <wx/dbtable.h>
-const LOOKUP_COL_LEN = 250;
+const int LOOKUP_COL_LEN = 250;
// Global database connection
extern wxDB *READONLY_DB;
m_strText("wxWindows drag & drop works :-)")
{
- SetBackgroundColour(* wxWHITE);
+// SetBackgroundColour(* wxWHITE);
// frame icon and status bar
SetIcon(wxICON(mondrian));
m_ctrlLog = new wxTextCtrl(this, -1, "", pos, size,
wxTE_MULTILINE | wxTE_READONLY |
- wxSUNKEN_BORDER| wxHSCROLL);
+ wxSUNKEN_BORDER );
// redirect log messages to the text window (don't forget to delete it!)
m_pLog = new wxLogTextCtrl(m_ctrlLog);
wxPaintDC dc(this);
dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL ) );
- dc.DrawText( "Drag text from here!", 20, h-30 );
+ dc.DrawText( "Drag text from here!", 20, h-22 );
}
void DnDFrame::OnDrag(wxCommandEvent& /* event */)
$(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \
mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \
fi
- @echo " Moving setup.h to library path"
@if test "@TOOLKIT@" = "MOTIF" ; then \
cd $(WXBASEDIR)/src ; \
$(INSTALL) -d $(libdir)/wx/include/wx/motif ; \
{
case 3:
#line 68 "parser.y"
-{process_command(proio_cons(make_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
+{process_command(proio_cons(wxmake_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
break;
case 4:
#line 70 "parser.y"
break;
case 6:
#line 76 "parser.y"
-{yyval.s = proio_cons(make_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
+{yyval.s = proio_cons(wxmake_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
break;
case 7:
#line 78 "parser.y"
break;
case 12:
#line 93 "parser.y"
-{yyval.s = proio_cons(make_word("="), proio_cons(make_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL)));
+{yyval.s = proio_cons(wxmake_word("="), proio_cons(wxmake_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL)));
free(yyvsp[-2].s); }
break;
case 13:
break;
case 14:
#line 99 "parser.y"
-{yyval.s = make_word(yyvsp[0].s); free(yyvsp[0].s);}
+{yyval.s = wxmake_word(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 15:
#line 101 "parser.y"
-{yyval.s = make_string(yyvsp[0].s); free(yyvsp[0].s);}
+{yyval.s = wxmake_string(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 16:
#line 103 "parser.y"
-{yyval.s = make_integer(yyvsp[0].s); free(yyvsp[0].s);}
+{yyval.s = wxmake_integer(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 17:
#line 105 "parser.y"
-{yyval.s = make_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
+{yyval.s = wxmake_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
break;
case 18:
#line 107 "parser.y"
-{yyval.s = make_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
+{yyval.s = wxmake_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
break;
case 19:
#line 110 "parser.y"
-{yyval.s = make_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s);
+{yyval.s = wxmake_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s);
free(yyvsp[0].s); }
break;
case 20:
/********** wxTable::bindInsertParams() **********/
bool wxTable::bindInsertParams(void)
{
- SWORD fSqlType;
- UDWORD precision;
- SWORD scale;
+ SWORD fSqlType = 0;
+ UDWORD precision = 0;
+ SWORD scale = 0;
// Bind each column (that can be inserted) of the table to a parameter marker
for (int i = 0; i < noCols; i++)
/********** wxTable::bindUpdateParams() **********/
bool wxTable::bindUpdateParams(void)
{
- SWORD fSqlType;
- UDWORD precision;
- SWORD scale;
+ SWORD fSqlType = 0;
+ UDWORD precision = 0;
+ SWORD scale = 0;
// Bind each UPDATEABLE column of the table to a parameter marker
for (int i = 0, colNo = 1; i < noCols; i++)
{
case 3:
#line 68 "parser.y"
-{process_command(proio_cons(make_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
+{process_command(proio_cons(wxmake_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
break;
case 4:
#line 70 "parser.y"
break;
case 6:
#line 76 "parser.y"
-{yyval.s = proio_cons(make_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
+{yyval.s = proio_cons(wxmake_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
break;
case 7:
#line 78 "parser.y"
break;
case 12:
#line 93 "parser.y"
-{yyval.s = proio_cons(make_word("="), proio_cons(make_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL)));
+{yyval.s = proio_cons(wxmake_word("="), proio_cons(wxmake_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL)));
free(yyvsp[-2].s); }
break;
case 13:
break;
case 14:
#line 99 "parser.y"
-{yyval.s = make_word(yyvsp[0].s); free(yyvsp[0].s);}
+{yyval.s = wxmake_word(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 15:
#line 101 "parser.y"
-{yyval.s = make_string(yyvsp[0].s); free(yyvsp[0].s);}
+{yyval.s = wxmake_string(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 16:
#line 103 "parser.y"
-{yyval.s = make_integer(yyvsp[0].s); free(yyvsp[0].s);}
+{yyval.s = wxmake_integer(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 17:
#line 105 "parser.y"
-{yyval.s = make_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
+{yyval.s = wxmake_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
break;
case 18:
#line 107 "parser.y"
-{yyval.s = make_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
+{yyval.s = wxmake_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
break;
case 19:
#line 110 "parser.y"
-{yyval.s = make_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s);
+{yyval.s = wxmake_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s);
free(yyvsp[0].s); }
break;
case 20:
;
command : WORD PERIOD
- {process_command(proio_cons(make_word($1), NULL)); free($1);}
+ {process_command(proio_cons(wxmake_word($1), NULL)); free($1);}
| expr PERIOD
{process_command($1);}
| error PERIOD
;
expr : WORD OPEN arglist CLOSE
- {$$ = proio_cons(make_word($1), $3); free($1);}
+ {$$ = proio_cons(wxmake_word($1), $3); free($1);}
| OPEN_SQUARE CLOSE_SQUARE
{$$ = proio_cons(NULL, NULL);}
| OPEN_SQUARE arglist CLOSE_SQUARE
;
arg : WORD EQUALS arg1
- {$$ = proio_cons(make_word("="), proio_cons(make_word($1), proio_cons($3, NULL)));
+ {$$ = proio_cons(wxmake_word("="), proio_cons(wxmake_word($1), proio_cons($3, NULL)));
free($1); }
| arg1
{$$ = $1; }
arg1 : WORD
- {$$ = make_word($1); free($1);}
+ {$$ = wxmake_word($1); free($1);}
| STRING
- {$$ = make_string($1); free($1);}
+ {$$ = wxmake_string($1); free($1);}
| INTEGER
- {$$ = make_integer($1); free($1);}
+ {$$ = wxmake_integer($1); free($1);}
| INTEGER PERIOD INTEGER
- {$$ = make_real($1, $3); free($1); free($3); }
+ {$$ = wxmake_real($1, $3); free($1); free($3); }
| INTEGER EXP INTEGER
- {$$ = make_exp($1, $3); free($1); free($3); }
+ {$$ = wxmake_exp($1, $3); free($1); free($3); }
|
INTEGER PERIOD INTEGER EXP INTEGER
- {$$ = make_exp2($1, $3, $5); free($1); free($3);
+ {$$ = wxmake_exp2($1, $3, $5); free($1); free($3);
free($5); }
| expr
*
*/
-char *make_integer(char *str)
+char *wxmake_integer(char *str)
{
wxExpr *x = new wxExpr(atol(str));
return (char *)x;
}
-char *make_real(char *str1, char *str2)
+char *wxmake_real(char *str1, char *str2)
{
char buf[50];
// extern "C" double exp10(double);
-char *make_exp(char *str1, char *str2)
+char *wxmake_exp(char *str1, char *str2)
{
double mantissa = (double)atoi(str1);
double exponent = (double)atoi(str2);
return (char *)x;
}
-char *make_exp2(char *str1, char *str2, char *str3)
+char *wxmake_exp2(char *str1, char *str2, char *str3)
{
char buf[50];
return (char *)x;
}
-char *make_word(char *str)
+char *wxmake_word(char *str)
{
wxExpr *x = new wxExpr(wxExprWord, str);
return (char *)x;
}
-char *make_string(char *str)
+char *wxmake_string(char *str)
{
char *s, *t;
int len, i;
void wxListMainWindow::DeleteColumn( int col )
{
- wxCHECK_RET( col < (int)m_columns.GetCount(),
+ wxCHECK_RET( col < (int)m_columns.GetCount(),
"attempting to delete inexistent column in wxListView" );
- m_dirty = TRUE;
- wxNode *node = m_columns.Nth( col );
- if (node) m_columns.DeleteNode( node );
+ m_dirty = TRUE;
+ wxNode *node = m_columns.Nth( col );
+ if (node) m_columns.DeleteNode( node );
}
void wxListMainWindow::DeleteAllItems( void )
{
- m_dirty = TRUE;
- m_current = (wxListLineData *) NULL;
- wxNode *node = m_lines.First();
- while (node)
- {
- wxListLineData *line = (wxListLineData*)node->Data();
- DeleteLine( line );
- node = node->Next();
- }
- m_lines.Clear();
+ m_dirty = TRUE;
+ m_current = (wxListLineData *) NULL;
+ wxNode *node = m_lines.First();
+ while (node)
+ {
+ wxListLineData *line = (wxListLineData*)node->Data();
+ DeleteLine( line );
+ node = node->Next();
+ }
+ m_lines.Clear();
}
void wxListMainWindow::DeleteEverything( void )
{
- m_dirty = TRUE;
- m_current = (wxListLineData *) NULL;
- wxNode *node = m_lines.First();
- while (node)
- {
- wxListLineData *line = (wxListLineData*)node->Data();
- DeleteLine( line );
- node = node->Next();
- }
- m_lines.Clear();
- m_current = (wxListLineData *) NULL;
- m_columns.Clear();
+ m_dirty = TRUE;
+ m_current = (wxListLineData *) NULL;
+ wxNode *node = m_lines.First();
+ while (node)
+ {
+ wxListLineData *line = (wxListLineData*)node->Data();
+ DeleteLine( line );
+ node = node->Next();
+ }
+ m_lines.Clear();
+ m_current = (wxListLineData *) NULL;
+ m_columns.Clear();
}
void wxListMainWindow::EnsureVisible( long index )
{
- wxListLineData *oldCurrent = m_current;
- m_current = (wxListLineData *) NULL;
- int i = index;
- wxNode *node = m_lines.Nth( i );
- if (node) m_current = (wxListLineData*)node->Data();
- if (m_current) MoveToFocus();
- m_current = oldCurrent;
+ wxListLineData *oldCurrent = m_current;
+ m_current = (wxListLineData *) NULL;
+ int i = index;
+ wxNode *node = m_lines.Nth( i );
+ if (node) m_current = (wxListLineData*)node->Data();
+ if (m_current) MoveToFocus();
+ m_current = oldCurrent;
}
long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(partial) )
{
- long pos = start;
- wxString tmp = str;
- if (pos < 0) pos = 0;
- wxNode *node = m_lines.Nth( pos );
- while (node)
- {
- wxListLineData *line = (wxListLineData*)node->Data();
- wxString s = "";
- line->GetText( 0, s );
- if (s == tmp) return pos;
- node = node->Next();
- pos++;
- }
- return -1;
+ long pos = start;
+ wxString tmp = str;
+ if (pos < 0) pos = 0;
+ wxNode *node = m_lines.Nth( pos );
+ while (node)
+ {
+ wxListLineData *line = (wxListLineData*)node->Data();
+ wxString s = "";
+ line->GetText( 0, s );
+ if (s == tmp) return pos;
+ node = node->Next();
+ pos++;
+ }
+ return -1;
}
long wxListMainWindow::FindItem(long start, long data)
{
- long pos = start;
- if (pos < 0) pos = 0;
- wxNode *node = m_lines.Nth( pos );
- while (node)
- {
- wxListLineData *line = (wxListLineData*)node->Data();
- wxListItem item;
- line->GetItem( 0, item );
- if (item.m_data == data) return pos;
- node = node->Next();
- pos++;
- }
- return -1;
+ long pos = start;
+ if (pos < 0) pos = 0;
+ wxNode *node = m_lines.Nth( pos );
+ while (node)
+ {
+ wxListLineData *line = (wxListLineData*)node->Data();
+ wxListItem item;
+ line->GetItem( 0, item );
+ if (item.m_data == data) return pos;
+ node = node->Next();
+ pos++;
+ }
+ return -1;
}
long wxListMainWindow::HitTest( int x, int y, int &flags )
{
- wxNode *node = m_lines.First();
- int count = 0;
- while (node)
- {
- wxListLineData *line = (wxListLineData*)node->Data();
- long ret = line->IsHit( x, y );
- if (ret & flags)
+ wxNode *node = m_lines.First();
+ int count = 0;
+ while (node)
{
- flags = ret;
- return count;
+ wxListLineData *line = (wxListLineData*)node->Data();
+ long ret = line->IsHit( x, y );
+ if (ret & flags)
+ {
+ flags = ret;
+ return count;
+ }
+ node = node->Next();
+ count++;
}
- node = node->Next();
- count++;
- }
- return -1;
+ return -1;
}
void wxListMainWindow::InsertItem( wxListItem &item )
{
- m_dirty = TRUE;
- int mode = 0;
- if (m_mode & wxLC_REPORT) mode = wxLC_REPORT;
- else if (m_mode & wxLC_LIST) mode = wxLC_LIST;
- else if (m_mode & wxLC_ICON) mode = wxLC_ICON;
- else if (m_mode & wxLC_SMALL_ICON) mode = wxLC_ICON; // no typo
- wxListLineData *line = new wxListLineData( this, mode, m_hilightBrush );
- if (m_mode & wxLC_REPORT)
- {
- line->InitItems( GetColumnCount() );
- item.m_width = GetColumnWidth( 0 )-3;
- }
- else
- line->InitItems( 1 );
- line->SetItem( 0, item );
- if ((item.m_itemId >= 0) && (item.m_itemId < (int)m_lines.GetCount()))
- {
- wxNode *node = m_lines.Nth( item.m_itemId );
- if (node) m_lines.Insert( node, line );
- }
- else
- {
- m_lines.Append( line );
- }
+ m_dirty = TRUE;
+ int mode = 0;
+ if (m_mode & wxLC_REPORT) mode = wxLC_REPORT;
+ else if (m_mode & wxLC_LIST) mode = wxLC_LIST;
+ else if (m_mode & wxLC_ICON) mode = wxLC_ICON;
+ else if (m_mode & wxLC_SMALL_ICON) mode = wxLC_ICON; // no typo
+
+ wxListLineData *line = new wxListLineData( this, mode, m_hilightBrush );
+
+ if (m_mode & wxLC_REPORT)
+ {
+ line->InitItems( GetColumnCount() );
+ item.m_width = GetColumnWidth( 0 )-3;
+ }
+ else
+ {
+ line->InitItems( 1 );
+ }
+
+ line->SetItem( 0, item );
+ if ((item.m_itemId >= 0) && (item.m_itemId < (int)m_lines.GetCount()))
+ {
+ wxNode *node = m_lines.Nth( item.m_itemId );
+ if (node) m_lines.Insert( node, line );
+ }
+ else
+ {
+ m_lines.Append( line );
+ }
}
void wxListMainWindow::InsertColumn( long col, wxListItem &item )
{
- m_dirty = TRUE;
- if (m_mode & wxLC_REPORT)
- {
- if (item.m_width == wxLIST_AUTOSIZE_USEHEADER) item.m_width = GetTextLength( item.m_text );
- wxListHeaderData *column = new wxListHeaderData( item );
- if ((col >= 0) && (col < (int)m_columns.GetCount()))
- {
- wxNode *node = m_columns.Nth( col );
- if (node)
- m_columns.Insert( node, column );
- }
- else
+ m_dirty = TRUE;
+ if (m_mode & wxLC_REPORT)
{
- m_columns.Append( column );
+ if (item.m_width == wxLIST_AUTOSIZE_USEHEADER) item.m_width = GetTextLength( item.m_text );
+ wxListHeaderData *column = new wxListHeaderData( item );
+ if ((col >= 0) && (col < (int)m_columns.GetCount()))
+ {
+ wxNode *node = m_columns.Nth( col );
+ if (node)
+ m_columns.Insert( node, column );
+ }
+ else
+ {
+ m_columns.Append( column );
+ }
}
- }
}
wxListCtrlCompare list_ctrl_compare_func_2;
int list_ctrl_compare_func_1( const void *arg1, const void *arg2 )
{
- wxListLineData *line1 = *((wxListLineData**)arg1);
- wxListLineData *line2 = *((wxListLineData**)arg2);
- wxListItem item;
- line1->GetItem( 0, item );
- long data1 = item.m_data;
- line2->GetItem( 0, item );
- long data2 = item.m_data;
- return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data );
+ wxListLineData *line1 = *((wxListLineData**)arg1);
+ wxListLineData *line2 = *((wxListLineData**)arg2);
+ wxListItem item;
+ line1->GetItem( 0, item );
+ long data1 = item.m_data;
+ line2->GetItem( 0, item );
+ long data2 = item.m_data;
+ return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data );
}
void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
{
- list_ctrl_compare_func_2 = fn;
- list_ctrl_compare_data = data;
- m_lines.Sort( list_ctrl_compare_func_1 );
+ list_ctrl_compare_func_2 = fn;
+ list_ctrl_compare_data = data;
+ m_lines.Sort( list_ctrl_compare_func_1 );
}
// -------------------------------------------------------------------------------------
wxListEvent::wxListEvent( wxEventType commandType, int id ):
wxNotifyEvent( commandType, id )
{
- m_code = 0;
- m_itemIndex = 0;
- m_oldItemIndex = 0;
- m_col = 0;
- m_cancelled = FALSE;
- m_pointDrag.x = 0;
- m_pointDrag.y = 0;
+ m_code = 0;
+ m_itemIndex = 0;
+ m_oldItemIndex = 0;
+ m_col = 0;
+ m_cancelled = FALSE;
+ m_pointDrag.x = 0;
+ m_pointDrag.y = 0;
}
// -------------------------------------------------------------------------------------
wxListCtrl::wxListCtrl(void)
{
- m_imageListNormal = (wxImageList *) NULL;
- m_imageListSmall = (wxImageList *) NULL;
- m_imageListState = (wxImageList *) NULL;
- m_mainWin = (wxListMainWindow*) NULL;
- m_headerWin = (wxListHeaderWindow*) NULL;
+ m_imageListNormal = (wxImageList *) NULL;
+ m_imageListSmall = (wxImageList *) NULL;
+ m_imageListState = (wxImageList *) NULL;
+ m_mainWin = (wxListMainWindow*) NULL;
+ m_headerWin = (wxListHeaderWindow*) NULL;
}
wxListCtrl::~wxListCtrl(void)
long style, const wxValidator &validator,
const wxString &name )
{
- m_imageListNormal = (wxImageList *) NULL;
- m_imageListSmall = (wxImageList *) NULL;
- m_imageListState = (wxImageList *) NULL;
- m_mainWin = (wxListMainWindow*) NULL;
- m_headerWin = (wxListHeaderWindow*) NULL;
+ m_imageListNormal = (wxImageList *) NULL;
+ m_imageListSmall = (wxImageList *) NULL;
+ m_imageListState = (wxImageList *) NULL;
+ m_mainWin = (wxListMainWindow*) NULL;
+ m_headerWin = (wxListHeaderWindow*) NULL;
- long s = style;
+ long s = style;
- if ((s & wxLC_REPORT == 0) &&
- (s & wxLC_LIST == 0) &&
- (s & wxLC_ICON == 0))
- s = s | wxLC_LIST;
+ if ((s & wxLC_REPORT == 0) &&
+ (s & wxLC_LIST == 0) &&
+ (s & wxLC_ICON == 0))
+ {
+ s = s | wxLC_LIST;
+ }
- bool ret = wxControl::Create( parent, id, pos, size, s, name );
+ bool ret = wxControl::Create( parent, id, pos, size, s, name );
- SetValidator( validator );
+ SetValidator( validator );
- if (s & wxSUNKEN_BORDER) s -= wxSUNKEN_BORDER;
+ if (s & wxSUNKEN_BORDER) s -= wxSUNKEN_BORDER;
- m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, s );
+ m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, s );
- if (GetWindowStyleFlag() & wxLC_REPORT)
- m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
- else
- m_headerWin = (wxListHeaderWindow *) NULL;
+ if (GetWindowStyleFlag() & wxLC_REPORT)
+ m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
+ else
+ m_headerWin = (wxListHeaderWindow *) NULL;
- return ret;
+ return ret;
}
void wxListCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
{
- // handled in OnIdle
+ /* handled in OnIdle */
- if (m_mainWin) m_mainWin->m_dirty = TRUE;
+ if (m_mainWin) m_mainWin->m_dirty = TRUE;
}
void wxListCtrl::SetSingleStyle( long style, bool add )
{
- long flag = GetWindowStyleFlag();
+ long flag = GetWindowStyleFlag();
- if (add)
- {
- if (style & wxLC_MASK_TYPE) flag = flag & ~wxLC_MASK_TYPE;
- if (style & wxLC_MASK_ALIGN) flag = flag & ~wxLC_MASK_ALIGN;
- if (style & wxLC_MASK_SORT) flag = flag & ~wxLC_MASK_SORT;
- }
+ if (add)
+ {
+ if (style & wxLC_MASK_TYPE) flag = flag & ~wxLC_MASK_TYPE;
+ if (style & wxLC_MASK_ALIGN) flag = flag & ~wxLC_MASK_ALIGN;
+ if (style & wxLC_MASK_SORT) flag = flag & ~wxLC_MASK_SORT;
+ }
- if (add)
- {
- flag |= style;
- }
- else
- {
- if (flag & style) flag -= style;
- }
+ if (add)
+ {
+ flag |= style;
+ }
+ else
+ {
+ if (flag & style) flag -= style;
+ }
- SetWindowStyleFlag( flag );
+ SetWindowStyleFlag( flag );
}
void wxListCtrl::SetWindowStyleFlag( long flag )
{
- m_mainWin->DeleteEverything();
+ m_mainWin->DeleteEverything();
- int width = 0;
- int height = 0;
- GetClientSize( &width, &height );
+ int width = 0;
+ int height = 0;
+ GetClientSize( &width, &height );
- m_mainWin->SetMode( flag );
+ m_mainWin->SetMode( flag );
- if (flag & wxLC_REPORT)
- {
- if (!(GetWindowStyleFlag() & wxLC_REPORT))
+ if (flag & wxLC_REPORT)
{
-// m_mainWin->SetSize( 0, 24, width, height-24 );
- if (!m_headerWin)
- {
- m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
- }
- else
- {
-// m_headerWin->SetSize( 0, 0, width, 23 );
- m_headerWin->Show( TRUE );
- }
+ if (!(GetWindowStyleFlag() & wxLC_REPORT))
+ {
+// m_mainWin->SetSize( 0, 24, width, height-24 );
+ if (!m_headerWin)
+ {
+ m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
+ }
+ else
+ {
+// m_headerWin->SetSize( 0, 0, width, 23 );
+ m_headerWin->Show( TRUE );
+ }
+ }
}
- }
- else
- {
- if (GetWindowStyleFlag() & wxLC_REPORT)
+ else
{
-// m_mainWin->SetSize( 0, 0, width, height );
- m_headerWin->Show( FALSE );
+ if (GetWindowStyleFlag() & wxLC_REPORT)
+ {
+// m_mainWin->SetSize( 0, 0, width, height );
+ m_headerWin->Show( FALSE );
+ }
}
- }
- wxWindow::SetWindowStyleFlag( flag );
+ wxWindow::SetWindowStyleFlag( flag );
}
bool wxListCtrl::GetColumn(int col, wxListItem &item) const
{
- m_mainWin->GetColumn( col, item );
- return TRUE;
+ m_mainWin->GetColumn( col, item );
+ return TRUE;
}
bool wxListCtrl::SetColumn( int col, wxListItem& item )
{
- m_mainWin->SetColumn( col, item );
- return TRUE;
+ m_mainWin->SetColumn( col, item );
+ return TRUE;
}
int wxListCtrl::GetColumnWidth( int col ) const
{
- return m_mainWin->GetColumnWidth( col );
+ return m_mainWin->GetColumnWidth( col );
}
bool wxListCtrl::SetColumnWidth( int col, int width )
{
- m_mainWin->SetColumnWidth( col, width );
- return TRUE;
+ m_mainWin->SetColumnWidth( col, width );
+ return TRUE;
}
int wxListCtrl::GetCountPerPage(void) const
bool wxListCtrl::GetItem( wxListItem &info ) const
{
- m_mainWin->GetItem( info );
- return TRUE;
+ m_mainWin->GetItem( info );
+ return TRUE;
}
bool wxListCtrl::SetItem( wxListItem &info )
{
- m_mainWin->SetItem( info );
- return TRUE;
+ m_mainWin->SetItem( info );
+ return TRUE;
}
long wxListCtrl::SetItem( long index, int col, const wxString& label, int imageId )
{
- wxListItem info;
- info.m_text = label;
- info.m_mask = wxLIST_MASK_TEXT;
- info.m_itemId = index;
- info.m_col = col;
- if ( imageId > -1 )
- {
- info.m_image = imageId;
- info.m_mask |= wxLIST_MASK_IMAGE;
- }
-;
- m_mainWin->SetItem(info);
- return TRUE;
+ wxListItem info;
+ info.m_text = label;
+ info.m_mask = wxLIST_MASK_TEXT;
+ info.m_itemId = index;
+ info.m_col = col;
+ if ( imageId > -1 )
+ {
+ info.m_image = imageId;
+ info.m_mask |= wxLIST_MASK_IMAGE;
+ };
+ m_mainWin->SetItem(info);
+ return TRUE;
}
int wxListCtrl::GetItemState( long item, long stateMask ) const
{
- return m_mainWin->GetItemState( item, stateMask );
+ return m_mainWin->GetItemState( item, stateMask );
}
bool wxListCtrl::SetItemState( long item, long state, long stateMask )
{
- m_mainWin->SetItemState( item, state, stateMask );
- return TRUE;
+ m_mainWin->SetItemState( item, state, stateMask );
+ return TRUE;
}
bool wxListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) )
{
- wxListItem info;
- info.m_image = image;
- info.m_mask = wxLIST_MASK_IMAGE;
- info.m_itemId = item;
- m_mainWin->SetItem( info );
- return TRUE;
+ wxListItem info;
+ info.m_image = image;
+ info.m_mask = wxLIST_MASK_IMAGE;
+ info.m_itemId = item;
+ m_mainWin->SetItem( info );
+ return TRUE;
}
wxString wxListCtrl::GetItemText( long item ) const
{
- wxListItem info;
- info.m_itemId = item;
- m_mainWin->GetItem( info );
- return info.m_text;
+ wxListItem info;
+ info.m_itemId = item;
+ m_mainWin->GetItem( info );
+ return info.m_text;
}
void wxListCtrl::SetItemText( long item, const wxString &str )
{
- wxListItem info;
- info.m_mask = wxLIST_MASK_TEXT;
- info.m_itemId = item;
- info.m_text = str;
- m_mainWin->SetItem( info );
+ wxListItem info;
+ info.m_mask = wxLIST_MASK_TEXT;
+ info.m_itemId = item;
+ info.m_text = str;
+ m_mainWin->SetItem( info );
}
long wxListCtrl::GetItemData( long item ) const
{
- wxListItem info;
- info.m_itemId = item;
- m_mainWin->GetItem( info );
- return info.m_data;
+ wxListItem info;
+ info.m_itemId = item;
+ m_mainWin->GetItem( info );
+ return info.m_data;
}
bool wxListCtrl::SetItemData( long item, long data )
{
- wxListItem info;
- info.m_mask = wxLIST_MASK_DATA;
- info.m_itemId = item;
- info.m_data = data;
- m_mainWin->SetItem( info );
- return TRUE;
+ wxListItem info;
+ info.m_mask = wxLIST_MASK_DATA;
+ info.m_itemId = item;
+ info.m_data = data;
+ m_mainWin->SetItem( info );
+ return TRUE;
}
bool wxListCtrl::GetItemRect( long item, wxRectangle &rect, int WXUNUSED(code) ) const
{
- m_mainWin->GetItemRect( item, rect );
- return TRUE;
+ m_mainWin->GetItemRect( item, rect );
+ return TRUE;
}
bool wxListCtrl::GetItemPosition( long item, wxPoint& pos ) const
{
- m_mainWin->GetItemPosition( item, pos );
- return TRUE;
+ m_mainWin->GetItemPosition( item, pos );
+ return TRUE;
}
bool wxListCtrl::SetItemPosition( long WXUNUSED(item), const wxPoint& WXUNUSED(pos) )
{
- return 0;
+ return 0;
}
int wxListCtrl::GetItemCount(void) const
{
- return m_mainWin->GetItemCount();
+ return m_mainWin->GetItemCount();
}
int wxListCtrl::GetColumnCount(void) const
{
- return m_mainWin->GetColumnCount();
+ return m_mainWin->GetColumnCount();
}
void wxListCtrl::SetItemSpacing( int spacing, bool isSmall )
{
- m_mainWin->SetItemSpacing( spacing, isSmall );
+ m_mainWin->SetItemSpacing( spacing, isSmall );
}
int wxListCtrl::GetItemSpacing( bool isSmall ) const
{
- return m_mainWin->GetItemSpacing( isSmall );
+ return m_mainWin->GetItemSpacing( isSmall );
}
int wxListCtrl::GetSelectedItemCount(void) const
{
- return m_mainWin->GetSelectedItemCount();
+ return m_mainWin->GetSelectedItemCount();
}
/*
long wxListCtrl::GetTopItem(void) const
{
- return 0;
+ return 0;
}
long wxListCtrl::GetNextItem( long item, int geom, int state ) const
{
- return m_mainWin->GetNextItem( item, geom, state );
+ return m_mainWin->GetNextItem( item, geom, state );
}
wxImageList *wxListCtrl::GetImageList(int which) const
{
- if (which == wxIMAGE_LIST_NORMAL)
- {
- return m_imageListNormal;
- }
- else if (which == wxIMAGE_LIST_SMALL)
- {
- return m_imageListSmall;
- }
- else if (which == wxIMAGE_LIST_STATE)
- {
- return m_imageListState;
- }
- return (wxImageList *) NULL;
+ if (which == wxIMAGE_LIST_NORMAL)
+ {
+ return m_imageListNormal;
+ }
+ else if (which == wxIMAGE_LIST_SMALL)
+ {
+ return m_imageListSmall;
+ }
+ else if (which == wxIMAGE_LIST_STATE)
+ {
+ return m_imageListState;
+ }
+ return (wxImageList *) NULL;
}
void wxListCtrl::SetImageList( wxImageList *imageList, int which )
{
- m_mainWin->SetImageList( imageList, which );
+ m_mainWin->SetImageList( imageList, which );
}
bool wxListCtrl::Arrange( int WXUNUSED(flag) )
{
- return 0;
+ return 0;
}
bool wxListCtrl::DeleteItem( long item )
{
- m_mainWin->DeleteItem( item );
- return TRUE;
+ m_mainWin->DeleteItem( item );
+ return TRUE;
}
bool wxListCtrl::DeleteAllItems(void)
{
- m_mainWin->DeleteAllItems();
- return TRUE;
+ m_mainWin->DeleteAllItems();
+ return TRUE;
}
bool wxListCtrl::DeleteAllColumns()
for ( size_t n = 0; n < m_mainWin->m_columns.GetCount(); n++ )
DeleteColumn(n);
- return TRUE;
+ return TRUE;
}
void wxListCtrl::ClearAll()
{
- m_mainWin->DeleteEverything();
+ m_mainWin->DeleteEverything();
}
bool wxListCtrl::DeleteColumn( int col )
{
- m_mainWin->DeleteColumn( col );
- return TRUE;
+ m_mainWin->DeleteColumn( col );
+ return TRUE;
}
/*
bool wxListCtrl::EnsureVisible( long item )
{
- m_mainWin->EnsureVisible( item );
- return TRUE;
+ m_mainWin->EnsureVisible( item );
+ return TRUE;
}
long wxListCtrl::FindItem( long start, const wxString& str, bool partial )
{
- return m_mainWin->FindItem( start, str, partial );
+ return m_mainWin->FindItem( start, str, partial );
}
long wxListCtrl::FindItem( long start, long data )
{
- return m_mainWin->FindItem( start, data );
+ return m_mainWin->FindItem( start, data );
}
long wxListCtrl::FindItem( long WXUNUSED(start), const wxPoint& WXUNUSED(pt),
int WXUNUSED(direction))
{
- return 0;
+ return 0;
}
long wxListCtrl::HitTest( const wxPoint &point, int &flags )
{
- return m_mainWin->HitTest( (int)point.x, (int)point.y, flags );
+ return m_mainWin->HitTest( (int)point.x, (int)point.y, flags );
}
long wxListCtrl::InsertItem( wxListItem& info )
{
- m_mainWin->InsertItem( info );
- return 0;
+ m_mainWin->InsertItem( info );
+ return 0;
}
long wxListCtrl::InsertItem( long index, const wxString &label )
}
}
- if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+ m_sizeSet = FALSE;
}
wxMenuBar *wxFrame::GetMenuBar() const
GetChildren().DeleteObject( m_frameToolBar );
- if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+ m_sizeSet = FALSE;
return m_frameToolBar;
}
m_frameStatusBar = OnCreateStatusBar( number, style, id, name );
- if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+ m_sizeSet = FALSE;
return m_frameStatusBar;
}
{
wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() );
event.SetEventObject( listbox );
- event.SetInt( sel );
+
+ wxArrayInt aSelections;
+ int count = listbox->GetSelections(aSelections);
+ if ( count > 0 )
+ {
+ event.m_commandInt = aSelections[0] ;
+ event.m_clientData = listbox->GetClientData( event.m_commandInt );
+ wxString str(listbox->GetString(event.m_commandInt));
+ if (str != "") event.m_commandString = copystring((char *)(const char *)str);
+ }
+ else
+ {
+ event.m_commandInt = -1 ;
+ event.m_commandString = copystring("") ;
+ }
+
listbox->GetEventHandler()->ProcessEvent( event );
+
+ if (event.m_commandString) delete[] event.m_commandString ;
}
return FALSE;
gtk_widget_set_usize( GTK_WIDGET(child->m_widget),
child->m_width,
child->m_height );
+
+ if (wxIS_KIND_OF(parent,wxFrame))
+ {
+ parent->m_sizeSet = FALSE;
+ }
}
//-----------------------------------------------------------------------------
}
}
- if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+ m_sizeSet = FALSE;
}
wxMenuBar *wxFrame::GetMenuBar() const
GetChildren().DeleteObject( m_frameToolBar );
- if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+ m_sizeSet = FALSE;
return m_frameToolBar;
}
m_frameStatusBar = OnCreateStatusBar( number, style, id, name );
- if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+ m_sizeSet = FALSE;
return m_frameStatusBar;
}
{
wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() );
event.SetEventObject( listbox );
- event.SetInt( sel );
+
+ wxArrayInt aSelections;
+ int count = listbox->GetSelections(aSelections);
+ if ( count > 0 )
+ {
+ event.m_commandInt = aSelections[0] ;
+ event.m_clientData = listbox->GetClientData( event.m_commandInt );
+ wxString str(listbox->GetString(event.m_commandInt));
+ if (str != "") event.m_commandString = copystring((char *)(const char *)str);
+ }
+ else
+ {
+ event.m_commandInt = -1 ;
+ event.m_commandString = copystring("") ;
+ }
+
listbox->GetEventHandler()->ProcessEvent( event );
+
+ if (event.m_commandString) delete[] event.m_commandString ;
}
return FALSE;
gtk_widget_set_usize( GTK_WIDGET(child->m_widget),
child->m_width,
child->m_height );
+
+ if (wxIS_KIND_OF(parent,wxFrame))
+ {
+ parent->m_sizeSet = FALSE;
+ }
}
//-----------------------------------------------------------------------------
int i, j;
char* ptr;
- j = STRLEN("/iodbc.ini") + 1;
+ j = STRLEN("/odbc.ini") + 1;
if( size < j )
{
}
#ifdef FIX_INI_FILE
- sprintf( buf, "%s/iodbc.ini", DIR_INI_FILE );
+ sprintf( buf, "%s/odbc.ini", DIR_INI_FILE );
#else
# ifdef OS2
*buf = '\0';
}
else
{
- strcpy( buf, "iodbc.ini" );
+ strcpy( buf, "odbc.ini" );
}
}
return NULL;
}
- sprintf( buf + i, "/iodbc.ini");
+ sprintf( buf + i, "/odbc.ini");
return buf;
# else
return NULL;
}
- sprintf( buf, "%s%s", ptr, "/.iodbc.ini");
+ sprintf( buf, "%s%s", ptr, "/.odbc.ini");
/* i.e. searching ~/.iodbc.ini */
# endif
# endif
c->bottom.SameAs (m_editorFrame, wxBottom, 0);
c->width.Unconstrained();
#if defined(__WXGTK__) || defined(__WXMOTIF__)
- c->height.Absolute(105);
+ c->height.Absolute(120);
#else
c->height.Absolute(60);
#endif
Summary: The GTK+ 1.0 port of wxWindows library
Name: wxGTK
-Version: 2b1
+Version: 2.0 beta 2
Release: 1
Copyright: LGPL
Group: X11/Libraries
-Source0: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK2b1.tgz
+Source0: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source
URL: http://www.freiburg.linux.de/~wxxt/docs.html
Packager: Michael Kiefte <mkiefte@gpu.srv.ualberta.ca>
Requires: gtk+ >= 1.0.4
/sbin/ldconfig
%files
-%doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt
+%doc docs/gtk/COPYING.LIB docs/gtk/install.txt docs/gtk/licence.txt docs/gtk/readme.txt docs/symbols.txt docs/gtk/todo.txt
/usr/include/wx
/usr/lib/wx
-/usr/lib/libwx_gtk_1_0.a
-/usr/lib/libwx_gtk_1_0.so
-/usr/lib/libwx_gtk_1_0.so.1
-/usr/lib/libwx_gtk_1_0.so.1.99
+/usr/lib/libwx_gtk2.a
+/usr/lib/libwx_gtk2.so
+/usr/lib/libwx_gtk2.so.0
+/usr/lib/libwx_gtk2.so.0.1
/usr/bin/wx-config