Re: Autoconf Work - Mailing list pgadmin-hackers

From Andreas Pflug
Subject Re: Autoconf Work
Date
Msg-id 3EB597D3.4060001@web.de
Whole thread Raw
In response to Re: Autoconf Work  (Jean-Michel POURE <jm.poure@freesurf.fr>)
Responses Re: Autoconf Work  (Jean-Michel POURE <jm.poure@freesurf.fr>)
Re: Autoconf Work  ("Adam H. Pendleton" <fmonkey@fmonkey.net>)
List pgadmin-hackers
Jean-Michel POURE wrote:

>
>1) wxWindows 2.4.0-1
>I used the binaries from wxWindows.org website, which are built for GTK 1.2.
>Do you confirm GTK 1.2 should be used and not GTK 2.0 (which provides Unicode
>support).
>
Yes, It's GTK 1.2.

>g++ -c `wx-config --cflags` -I/usr/lib/wx/include
>-I/usr/lib/wx/contrib/include -Iinclude -I/usr/include -g -o ui/frmEditGrid.o
>ui/frmEditGrid.cpp
>cc1plus: AVERTISSEMENT: modification de l'ordonnancement de recherche du
>répertoire système « /usr/include »
>cc1plus: AVERTISSEMENT:   comme il a été déjà spécifié comme répertoire non
>système
>ui/frmEditGrid.cpp:13:32: wx/generic/gridsel.h: Aucun fichier ou répertoire de
>ce type
>ui/frmEditGrid.cpp: Dans member function « bool
>   ctlSQLGrid::SetTable(wxGridTableBase*, bool) »:
>ui/frmEditGrid.cpp:298: utilisation invalide d'un type indéfini «struct
>   wxGridSelection»
>/usr/include/wx/generic/grid.h:80: déclaration par l'avant (forward) de «
>   struct wxGridSelection»
>
My french tends to abandon me here... If I understand it right, the file
gridsel.h isn't found.
The problem about the wxGrid is that some bugs are present in 2.4.0.
Namely, SetTable() can be called only once, so I wrote a replacement
version which needs that wxGridSelection class to clean it up (greetings
to Keith:-). This class isn't documented officially, maybe it's not
included in your binary distribution. For your convenience, I attached
the file.
So far, I haven't prepared patches for wxWindows, which would solve this
problem finally. But it would still take some time until it's included
in the distributions. So at the moment, we either need wxWindows 2.4.0
from source or the additional file. How about checking this file in
autoconf and copying it into place if missing?

Regards,
Andreas

>make: *** [ui/frmEditGrid.o] Erreur 1
>
>Any help welcome.
>Cheers, Jean-Michel
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
>

/////////////////////////////////////////////////////////////////////////////
// Name:        wx/generic/gridsel.h
// Purpose:     wxGridSelection
// Author:      Stefan Neis
// Modified by:
// Created:     20/02/2000
// RCS-ID:      $$
// Copyright:   (c) Stefan Neis
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#include "wx/defs.h"

#if defined(wxUSE_NEW_GRID) && (wxUSE_NEW_GRID)

#ifndef __WXGRIDSEL_H__
#define __WXGRIDSEL_H__

#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "gridsel.h"
#endif

#include "wx/grid.h"

class WXDLLEXPORT wxGridSelection{
public:
    wxGridSelection( wxGrid * grid, wxGrid::wxGridSelectionModes sel =
                     wxGrid::wxGridSelectCells );
    bool IsSelection();
    bool IsInSelection ( int row, int col );
    void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
    wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; }
    void SelectRow( int row,
                    bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                    bool AltDown = FALSE, bool MetaDown = FALSE );
    void SelectCol( int col,
                    bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                    bool AltDown = FALSE, bool MetaDown = FALSE );
    void SelectBlock( int topRow, int leftCol,
                      int bottomRow, int rightCol,
                      bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                      bool AltDown = FALSE, bool MetaDown = FALSE,
                      bool sendEvent = TRUE );
    void SelectCell( int row, int col,
                     bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                     bool AltDown = FALSE, bool MetaDown = FALSE,
                     bool sendEvent = TRUE );
    void ToggleCellSelection( int row, int col,
                              bool ControlDown = FALSE,
                              bool ShiftDown = FALSE,
                              bool AltDown = FALSE, bool MetaDown = FALSE );
    void ClearSelection();

    void UpdateRows( size_t pos, int numRows );
    void UpdateCols( size_t pos, int numCols );

private:
    int BlockContain( int topRow1, int leftCol1,
                       int bottomRow1, int rightCol1,
                       int topRow2, int leftCol2,
                       int bottomRow2, int rightCol2 );
      // returns 1, if Block1 contains Block2,
      //        -1, if Block2 contains Block1,
      //         0, otherwise

    int BlockContainsCell( int topRow, int leftCol,
                           int bottomRow, int rightCol,
                           int row, int col )
      // returns 1, if Block contains Cell,
      //         0, otherwise
    {
        return ( topRow <= row && row <= bottomRow &&
                 leftCol <= col && col <= rightCol );
    }

    wxGridCellCoordsArray               m_cellSelection;
    wxGridCellCoordsArray               m_blockSelectionTopLeft;
    wxGridCellCoordsArray               m_blockSelectionBottomRight;
    wxArrayInt                          m_rowSelection;
    wxArrayInt                          m_colSelection;

    wxGrid                              *m_grid;
    wxGrid::wxGridSelectionModes        m_selectionMode;

    friend class WXDLLEXPORT wxGrid;
};

#endif  // #ifdef __WXGRIDSEL_H__
#endif  // #ifndef wxUSE_NEW_GRID

pgadmin-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: Autoconf Work
Next
From: Jean-Michel POURE
Date:
Subject: Re: Autoconf Work