git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26638
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
15 files changed:
// Overridables
// Start/end copying
// Overridables
// Start/end copying
- virtual bool OnStartCopy(wxDiagram* diagramTo) { return TRUE; };
- virtual bool OnEndCopy(wxDiagram* diagramTo) { return TRUE; };
+ virtual bool OnStartCopy(wxDiagram* WXUNUSED(diagramTo)) { return TRUE; };
+ virtual bool OnEndCopy(wxDiagram* WXUNUSED(diagramTo)) { return TRUE; };
// Override this to e.g. have the shape added through a Do/Undo command system.
// By default, we'll just add it directly to the destination diagram, and
// Override this to e.g. have the shape added through a Do/Undo command system.
// By default, we'll just add it directly to the destination diagram, and
~csDiagramClipboard() {}
// Start/end copying
~csDiagramClipboard() {}
// Start/end copying
- bool OnStartCopy(wxDiagram* diagramTo);
- bool OnEndCopy(wxDiagram* diagramTo);
+ virtual bool OnStartCopy(wxDiagram* diagramTo);
+ virtual bool OnEndCopy(wxDiagram* diagramTo);
- bool OnAddShape(wxDiagram* diagramTo, wxShape* newShape, wxDC* dc);
+ virtual bool OnAddShape(wxDiagram* diagramTo, wxShape* newShape, wxDC* dc);
protected:
csDiagramCommand* m_currentCmd;
protected:
csDiagramCommand* m_currentCmd;
wxRealPoint *second_last_line_point = (wxRealPoint *)second_last_line_node->GetData();
// Position where we want to start drawing
wxRealPoint *second_last_line_point = (wxRealPoint *)second_last_line_node->GetData();
// Position where we want to start drawing
- double positionOnLineX, positionOnLineY;
+ double positionOnLineX = 0.0, positionOnLineY = 0.0;
// Position of start point of line, at the end of which we draw the arrow.
double startPositionX = 0.0 , startPositionY = 0.0;
// Position of start point of line, at the end of which we draw the arrow.
double startPositionX = 0.0 , startPositionY = 0.0;
// Do each end - nothing in the middle. User has to move other points
// manually if necessary.
// Do each end - nothing in the middle. User has to move other points
// manually if necessary.
- double end_x, end_y;
- double other_end_x, other_end_y;
+ double end_x = 0.0, end_y = 0.0;
+ double other_end_x = 0.0, other_end_y = 0.0;
wxNode *first = m_lineControlPoints->GetFirst();
/* wxRealPoint *first_point = */ (wxRealPoint *)first->GetData();
wxNode *first = m_lineControlPoints->GetFirst();
/* wxRealPoint *first_point = */ (wxRealPoint *)first->GetData();
wxString s = GetParamValue(param);
if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg;
wxString s = GetParamValue(param);
if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg;
is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
public:
NodeHandlerUnknown() : NodeHandler(new NodeInfo) {}
public:
NodeHandlerUnknown() : NodeHandler(new NodeInfo) {}
- virtual bool CanHandle(wxXmlNode *node) { return TRUE; }
+ virtual bool CanHandle(wxXmlNode *WXUNUSED(node)) { return TRUE; }
- virtual wxString GetPropName(const PropertyInfo& pinfo)
+ virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
{
if (m_which == 0) return _T("x"); else return _T("y");
}
virtual bool HasClearButton() { return FALSE; }
{
if (m_which == 0) return _T("x"); else return _T("y");
}
virtual bool HasClearButton() { return FALSE; }
- virtual bool IsPresent(const PropertyInfo& pinfo) { return FALSE; }
+ virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
- virtual wxString GetPropName(const PropertyInfo& pinfo)
+ virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
{
return _T("dlg");
}
virtual bool HasClearButton() { return FALSE; }
{
return _T("dlg");
}
virtual bool HasClearButton() { return FALSE; }
- virtual bool IsPresent(const PropertyInfo& pinfo) { return FALSE; }
+ virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
return XmlReadValue(GetNode(), pi->Name).BeforeFirst(_T('d'));
}
return XmlReadValue(GetNode(), pi->Name).BeforeFirst(_T('d'));
}
- virtual wxString GetPropName(const PropertyInfo& pinfo)
+ virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
{
return _T("val");
}
virtual bool HasClearButton() { return FALSE; }
{
return _T("val");
}
virtual bool HasClearButton() { return FALSE; }
- virtual bool IsPresent(const PropertyInfo& pinfo) { return FALSE; }
+ virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
PropEditCtrlNull(PropertiesFrame *propFrame)
: PropEditCtrl(propFrame) {}
PropEditCtrlNull(PropertiesFrame *propFrame)
: PropEditCtrl(propFrame) {}
- virtual void BeginEdit(const wxRect& rect, wxTreeItemId ti) {}
+ virtual void BeginEdit(const wxRect& WXUNUSED(rect), wxTreeItemId WXUNUSED(ti)) {}
virtual void EndEdit() {}
virtual wxWindow* CreateEditCtrl() {return NULL;}
virtual void EndEdit() {}
virtual wxWindow* CreateEditCtrl() {return NULL;}
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
-// Name: BrowserDB.h,cpp
-// Purpose: a wxDB class
-// Author: Mark Johnson
+// Name: BrowserDB.h,cpp
+// Purpose: a wxDB class
+// Author: Mark Johnson
-// Created: 19991127.mj10777
-// Copyright: (c) Mark Johnson
-// Licence: wxWindows license
-// RCS-ID: $Id$
+// Created: 19991127.mj10777
+// Copyright: (c) Mark Johnson
+// Licence: wxWindows license
+// RCS-ID: $Id$
//----------------------------------------------------------------------------------------
//-- 1)
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
//-- 1)
//----------------------------------------------------------------------------------------
#endif
//----------------------------------------------------------------------------------------
#endif
//----------------------------------------------------------------------------------------
-extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */
+extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */
//----------------------------------------------------------------------------------------
wxChar *GetExtendedDBErrorMsg(wxChar *ErrFile, int ErrLine)
//----------------------------------------------------------------------------------------
wxChar *GetExtendedDBErrorMsg(wxChar *ErrFile, int ErrLine)
//---------------------------------------------------------------------------------------
DlgUser *p_Dlg;
p_Dlg = new DlgUser(pDoc->p_MainFrame,pDoc,_T(""));
//---------------------------------------------------------------------------------------
DlgUser *p_Dlg;
p_Dlg = new DlgUser(pDoc->p_MainFrame,pDoc,_T(""));
- p_Dlg->s_DSN = ODBCSource;
- p_Dlg->s_User = UserName;
+ p_Dlg->s_DSN = ODBCSource;
+ p_Dlg->s_User = UserName;
p_Dlg->s_Password = Password;
p_Dlg->OnInit();
p_Dlg->Fit();
p_Dlg->s_Password = Password;
p_Dlg->OnInit();
p_Dlg->Fit();
if (OK)
{
//--------------------------------------------------------------------------------------
if (OK)
{
//--------------------------------------------------------------------------------------
- DbConnectInf.SetDsn(ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT)
- DbConnectInf.SetUserID(UserName); // database username - must already exist in the data source
- DbConnectInf.SetPassword(Password); // password database username
+ DbConnectInf.SetDsn(ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT)
+ DbConnectInf.SetUserID(UserName); // database username - must already exist in the data source
+ DbConnectInf.SetPassword(Password); // password database username
db_BrowserDB = wxDbGetConnection(&DbConnectInf);
// wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str());
if (db_BrowserDB == NULL)
db_BrowserDB = wxDbGetConnection(&DbConnectInf);
// wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str());
if (db_BrowserDB == NULL)
bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
{
SDWORD cb;
bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
{
SDWORD cb;
- int i_dbDataType;
- int i=0;
- long l_temp;
- double f_temp;
- int AnzError=0;
+ long l_temp;
+ double f_temp;
+ int AnzError=0;
TIMESTAMP_STRUCT t_temp;
wxString Temp0;
//-----------------------------
TIMESTAMP_STRUCT t_temp;
wxString Temp0;
//-----------------------------
for (i=0;i<Cols;i++)
{
wxStrcpy((cl_BrowserDB+i)->tableName,_T("-E->"));
i_dbDataType = (cl_BrowserDB+i)->pColFor->i_dbDataType;
for (i=0;i<Cols;i++)
{
wxStrcpy((cl_BrowserDB+i)->tableName,_T("-E->"));
i_dbDataType = (cl_BrowserDB+i)->pColFor->i_dbDataType;
- if (i_dbDataType == 0) // Filter unsupported dbDataTypes
+ if (i_dbDataType == 0) // Filter unsupported dbDataTypes
{
if (((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_VARCHAR) ||
{
if (((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_VARCHAR) ||
- ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_LONGVARCHAR))
+ ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_LONGVARCHAR))
i_dbDataType = DB_DATA_TYPE_VARCHAR;
if ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DATE)
i_dbDataType = DB_DATA_TYPE_DATE;
i_dbDataType = DB_DATA_TYPE_VARCHAR;
if ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DATE)
i_dbDataType = DB_DATA_TYPE_DATE;
i_dbDataType = DB_DATA_TYPE_FLOAT;
}
if ((i_dbDataType == DB_DATA_TYPE_INTEGER) &&
i_dbDataType = DB_DATA_TYPE_FLOAT;
}
if ((i_dbDataType == DB_DATA_TYPE_INTEGER) &&
- ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DOUBLE))
- { // DBASE Numeric
+ ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DOUBLE))
+ { // DBASE Numeric
i_dbDataType = DB_DATA_TYPE_FLOAT;
}
switch(i_dbDataType)
i_dbDataType = DB_DATA_TYPE_FLOAT;
}
switch(i_dbDataType)
else
{
// i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
else
{
// i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
- if (((cl_BrowserDB+i)->pColFor->i_Nation == 0) || // TS YYYY-MM-DD
- ((cl_BrowserDB+i)->pColFor->i_Nation == 3)) // IT YYYY-MM-DD
+ if (((cl_BrowserDB+i)->pColFor->i_Nation == 0) || // TS YYYY-MM-DD
+ ((cl_BrowserDB+i)->pColFor->i_Nation == 3)) // IT YYYY-MM-DD
{
Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.year,t_temp.month,t_temp.day,
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
{
Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.year,t_temp.month,t_temp.day,
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
wxStrcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
}
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
wxStrcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
}
- if ((cl_BrowserDB+i)->pColFor->i_Nation == 3) // US MM/DD/YYYY
+ if ((cl_BrowserDB+i)->pColFor->i_Nation == 3) // US MM/DD/YYYY
{
Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.month,t_temp.day,t_temp.year,
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
{
Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.month,t_temp.day,t_temp.year,
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
- cl_BrowserDB = NULL;
- ct_BrowserDB = NULL;
- db_BrowserDB = NULL;
- p_LogWindow = NULL;
+ cl_BrowserDB = NULL;
+ ct_BrowserDB = NULL;
+ db_BrowserDB = NULL;
+ p_LogWindow = NULL;
}
//----------------------------------------------------------------------------------------
}
//----------------------------------------------------------------------------------------
// notifications (can be handled by derivatives)
// notifications (can be handled by derivatives)
- virtual void OnTabAdded( twTabInfo* pInfo ) {}
+ virtual void OnTabAdded( twTabInfo* WXUNUSED(pInfo) ) {}
virtual void SizeTabs(int x,int y, int width, int height, bool repant);
virtual void SizeTabs(int x,int y, int width, int height, bool repant);
bool LifeCellBox::IsAlive(int dx, int dy) const
{
if (dy > 3)
bool LifeCellBox::IsAlive(int dx, int dy) const
{
if (dy > 3)
- return (m_live2 & 1 << ((dy - 4) * 8 + dx));
+ return (bool)(m_live2 & 1 << ((dy - 4) * 8 + dx));
- return (m_live1 & 1 << ((dy) * 8 + dx));
+ return (bool)(m_live1 & 1 << ((dy) * 8 + dx));
public:
URLDropTarget() { SetDataObject(new wxURLDataObject); }
public:
URLDropTarget() { SetDataObject(new wxURLDataObject); }
- void OnDropURL(wxCoord x, wxCoord y, const wxString& text)
+ void OnDropURL(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxString& text)
{
// of course, a real program would do something more useful here...
wxMessageBox(text, _T("wxDnD sample: got URL"),
{
// of course, a real program would do something more useful here...
wxMessageBox(text, _T("wxDnD sample: got URL"),
// URLs can't be moved, only copied
virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
// URLs can't be moved, only copied
virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
+ wxDragResult WXUNUSED(def))
{
return wxDragLink; // At least IE 5.x needs wxDragLink, the
// other browsers on MSW seem okay with it too.
{
return wxDragLink; // At least IE 5.x needs wxDragLink, the
// other browsers on MSW seem okay with it too.
- void OnPaint(wxPaintEvent& event)
+ void OnPaint(wxPaintEvent& WXUNUSED(event))
}
virtual bool SetData(const wxDataFormat& format,
}
virtual bool SetData(const wxDataFormat& format,
- size_t len, const void *buf)
+ size_t WXUNUSED(len), const void *buf)
{
wxCHECK_MSG( format == m_formatShape, false,
wxT( "unsupported format") );
{
wxCHECK_MSG( format == m_formatShape, false,
wxT( "unsupported format") );
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
- void OnIncFont(wxCommandEvent& event) { DoResizeFont(+2); }
- void OnDecFont(wxCommandEvent& event) { DoResizeFont(-2); }
+ void OnIncFont(wxCommandEvent& WXUNUSED(event)) { DoResizeFont(+2); }
+ void OnDecFont(wxCommandEvent& WXUNUSED(event)) { DoResizeFont(-2); }
void OnBold(wxCommandEvent& event);
void OnItalic(wxCommandEvent& event);
void OnBold(wxCommandEvent& event);
void OnItalic(wxCommandEvent& event);
- virtual void DoLogString(const wxChar *szString, time_t t)
+ virtual void DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{
wxString msg;
TimeStamp(&msg);
{
wxString msg;
TimeStamp(&msg);
void OnKeyUp(wxKeyEvent& event) { LogEvent(_T("Key up"), event); }
void OnChar(wxKeyEvent& event) { LogEvent(_T("Char"), event); }
void OnKeyUp(wxKeyEvent& event) { LogEvent(_T("Key up"), event); }
void OnChar(wxKeyEvent& event) { LogEvent(_T("Char"), event); }
- void OnPaint(wxPaintEvent& event)
+ void OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
dc.SetTextForeground(*wxWHITE);
{
wxPaintDC dc(this);
dc.SetTextForeground(*wxWHITE);
- virtual void DoLogString(const wxChar *szString, time_t t)
+ virtual void DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{
wxString msg;
TimeStamp(&msg);
{
wxString msg;
TimeStamp(&msg);
items.Add(m_lbox->GetString(n));
}
items.Add(m_lbox->GetString(n));
}
- m_sizerLbox->Remove(m_lbox);
+ m_sizerLbox->Detach(m_lbox);
void UpdateClock();
// event handlers
void UpdateClock();
// event handlers
- void OnTimer(wxTimerEvent& event) { UpdateClock(); }
+ void OnTimer(wxTimerEvent& WXUNUSED(event)) { UpdateClock(); }
void OnSize(wxSizeEvent& event);
void OnToggleClock(wxCommandEvent& event);
void OnButton(wxCommandEvent& event);
void OnSize(wxSizeEvent& event);
void OnToggleClock(wxCommandEvent& event);
void OnButton(wxCommandEvent& event);
wxString s = GetParamValue(param);
if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg;
wxString s = GetParamValue(param);
if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg;
is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();