but I cannot publish his work... without his autorization !!!
but I cannot publish his work... without his autorization !!!
aca arturo indica que retiro la clase por problemas de "distribucion",
ya que alguien la estaba vendido como suya por 300.00 euros.
http://www.lawebdelprogramador.com/foro ... Gantt.html
si realizamos una busqueda en el foro por la palabra tgantt, no encontramos recurrentemente que la autoria de la clase se le atribuye a Ramon Avenda帽o, gran colaborador y desarrollador de clases de gratuitas para fivewin.
asi mismo Arturo nunca da indicios que la clase no sea otra cosa que un desarrollo suyo.
creo que lo mejor es que la comunidad realize el desarrollo de una nueva clase tgantt publica, o que fivetech la desarrolle como parte de su producto, para evitar este tipo de problemas.
salu2
carlos vargas
Carlos,
Arturo la copi贸 de Ram贸n.
Hi to all, sorry for jumping in, but just could not resist...
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros
Regards/Saludos to everybody
Euclides

/*-------------------------------------------------------------------------\
| 聽 聽 聽 聽Class: Class Tplan 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽|
| 聽 Descripton: Remake of Tgant class 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽|
| 聽 聽 Language: xharbour /fw 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 |
| 聽 聽 聽Version: 1.00 version. 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽|
| 聽 聽 聽 聽 Date: 22/01/2000 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 |
| 聽 聽 聽 Author: Ramon Avendano, 1998 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 |
| 聽 聽 聽 Adds by: 聽 Silvio Falconi 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽|
| 聽 聽 聽 Rights: There are some restrictions to the use of this code. 聽 聽 聽 |
| 聽 聽 聽 聽 聽 聽 聽 Please read the README file that accompanied this code 聽 聽 |
| 聽 聽 聽 聽 聽 聽 聽 before using it or modifying it. 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 |
| 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽|
| 聽 Warranties: None. The code has not been rigorously tested in a formal 聽|
| 聽 聽 聽 聽 聽 聽 聽 development environment, and is offered as-is. 聽The author |
| 聽 聽 聽 聽 聽 聽 聽 assumes no responsibility for its use, or for any 聽 聽 聽 聽 聽|
| 聽 聽 聽 聽 聽 聽 聽 consequences that may arise from its use. 聽 聽 聽 聽 聽 聽 聽 聽 聽|
| 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽|
|
\-------------------------------------------------------------------------*/Euclides wrote:Hi to all, sorry for jumping in, but just could not resist...![]()
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros![]()
![]()
![]()
Regards/Saludos to everybody
Euclides
Hi to all, sorry for jumping in, but just could not resist...
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros
Regards/Saludos to everybody
Euclides

Thanks Mr. MdaSolution for the clarification.
At this moment seems that Ramon Avendano, as we are not hearing from Mr. Tamayo, is the only one that can solve this puzzle.
George
Can we download a working exe to see this class in action.
Best regards,
Otto
Hi,
Ram贸n published his class on the old OZS news server (news.fivetechsoft.com).
Arturo took this class and added Hernan麓s Browse.
I think both, Arturo and Silvio, tried to sell the class. But as original Ramon麓s autorship was public, both people stopped distributing this class.
Maybe Antonio has a copy of old OZS news.
If someone has Ram贸n Avenda帽o Class TGant sources, please email them to me as we are going to test it, contact him and ask for authorization.
Does someone know the current email of Ram贸n ? thanks
Hola F茅lix:
Yo no hice realmente una clase Tgantt, solo y hace mucho tiempo extraje de uno de mis programas la parte que generaba una grafica tipo Gantt y la retoque como ejemplo para alguien y se lo mande (no recuerdo a quien) para que hiciese lo que quisiera con ello.
No se s铆 en alg煤n viejo ordenador puedo tener algo de esto, pero creo que lo que en su momento hice sobre el tema lo he perdido.
He entrado en el enlace del foro que me adjuntas, creo que se ha montado un peque帽o lio de algo que hice hace mucho tiempo y que poco valor tenia y si alguien aun tiene algo m铆o sobre el tema lo puede publicar, aunque ya digo que de poco puede valer.
Para cualquier cosa m谩s escr铆beme a avendano@mundo-r.com, al que me has escrito apenas lo utilizo.
Un saludo,
Ram贸n Avenda帽o.
Un abrazo,
#include "FiveWin.ch"
#define GWL_STYLE 聽 聽 聽 聽 聽 -16
Static nOldCol,nOldRow
Static nOldCol1,nOldCol2,nOldRow2
//----------------------------------------------------------------------------//
CLASS TGantt FROM TControl
聽 聽DATA 聽 nWidth, nHeight
聽 聽DATA 聽 aItems,lCaptured,lCaptuPre
聽 聽DATA 聽 nItem,nItePre
聽 聽DATA 聽 nRow1,nRow2,nCol1,nCol2 AS NUMERIC INIT 0
聽 聽DATA 聽 nRowi1,nRowi2,nColi1,nColi2 AS NUMERIC INIT 0
聽 聽DATA 聽 hTrazoPen
聽 聽DATA 聽 hOldPen
聽 聽DATA 聽 iRop,bLbx
聽 聽DATA 聽 nLCol,nRCol AS LOGICAL INIT .f.
聽 聽DATA 聽 bChange
聽 聽DATA 聽 bPresed
聽 聽DATA 聽 bTrovaTIP,bIniziofine 聽 聽
聽 聽DATA 聽 cToolTip,cTipIniFine 聽 聽 聽
聽 聽CLASSDATA lRegistered AS LOGICAL
聽 聽METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, lBorder,;
聽 聽 聽 聽 聽 聽 聽 聽lVScroll, lHScroll, nClrFore, nClrBack,bchange,dpresed,blbx) CONSTRUCTOR
聽 聽METHOD Redefine( nId, oWnd, nClrFore, nClrBack ) CONSTRUCTOR
聽 聽MESSAGE FillRect( aRect, oBrush,barra ) 聽METHOD _FillRect( aRect, oBrush,barra )
聽 聽METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0
聽 聽METHOD Paint()
聽 聽METHOD LButtonDown( nRow, nCol, nKeyFlags )
聽 聽METHOD LButtonUp( nRow, nCol, nKeyFlags ) 聽
聽 聽METHOD MouseMove( nRow, nCol, nKeyFlags )
聽 聽METHOD LDblClick( nRow, nCol, nKeyFlags )
聽 聽
聽 聽METHOD Line( nTop, nLeft, nBottom, nRight, oPen )
聽 聽METHOD Rectang( nTop, nLeft, nBottom, nRight, oPen,Barra )
聽 聽METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel, ;
聽 聽 聽 聽 聽 聽 聽 聽lTransparent, nAlign )
聽 聽METHOD DibRect()
聽 聽METHOD DibLine()
聽 聽METHOD End()
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, lBorder,;
聽 聽 聽 聽 聽 聽 lVScroll, lHScroll, nClrFore, nClrBack,bChange,bPresed,blbx ) CLASS TGantt
// 聽 DEFAULT nWidth := 100, nHeight := 100,;
聽 聽DEFAULT lBorder := .T.,;
聽 聽 聽 聽 聽 聽lVScroll := .f., lHScroll := .f.,;
聽 聽 聽 聽 聽 聽oWnd := GetWndDefault()
聽 聽::cCaption 聽 = ""
聽 聽::lCaptured = .f.
聽 聽::lCaptuPre = .f.
聽 聽::aitems 聽 = {}
聽 聽::nitem 聽 聽= 0
聽 聽::nitePre 聽 = 0
聽 聽::nTop 聽 聽 = nTop
聽 聽::nLeft 聽 聽= nLeft
聽 聽::nBottom 聽= nTop + nHeight - 1
聽 聽::nRight 聽 = nLeft + nWidth - 1
聽 聽::oWnd 聽 聽 = oWnd
聽 聽::bchange 聽= bChange
聽 聽::bPresed 聽= bPresed
聽 聽::bLbx 聽 聽 = bLbx
聽 聽::nStyle 聽 = nOr( WS_CHILD,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽If( lBorder, WS_BORDER, 0 ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽If( lVScroll, WS_VSCROLL, 0 ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽If( lHScroll, WS_HSCROLL, 0 ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽WS_VISIBLE, WS_TABSTOP)
聽 聽::Register() // nOR(CS_VREDRAW,CS_HREDRAW) )
聽 聽::cToolTip := ''
聽 聽::cTipIniFine := ''
聽 聽::SetColor( nClrFore, nClrBack )
聽 聽::htrazopen:=createpen(PS_SOLID,1,nRGB(128,128,128) )
聽 聽if oWnd:lVisible
聽 聽 聽 ::Create()
聽 聽 聽 ::Default()
聽 聽 聽 ::lVisible = .t.
聽 聽 聽 oWnd:AddControl( Self )
聽 聽else
聽 聽 聽 oWnd:DefControl( Self )
聽 聽 聽 ::lVisible 聽= .f.
聽 聽endif
/*
聽 聽if lVScroll
聽 聽 聽 DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
聽 聽endif
聽 聽if lHScroll
聽 聽 聽 DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self
聽 聽endif
*/
return Self
//----------------------------------------------------------------------------//
METHOD Redefine( nId, oWnd, nClrFore, nClrBack,bChange, bPresed,blbx ) CLASS TGantt
聽 聽DEFAULT oWnd := GetWndDefault()
聽 聽::nId 聽 聽 聽 = nId
聽 聽::cCaption 聽= ""
聽 聽::lCaptured = .f.
聽 聽::lCaptuPre = .f.
聽 聽::oWnd 聽 聽 聽= oWnd
聽 聽::bchange 聽 = bChange
聽 聽::bPresed 聽 = bPresed
聽 聽::bLbx 聽 聽 聽= bLbx
聽 聽::nWidth 聽 聽= 100
聽 聽::nHeight 聽 = 100
聽 聽::Register()
聽 聽::SetColor( nClrFore, nClrBack )
聽 聽
聽 聽if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_VSCROLL )
聽 聽 聽 DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
聽 聽endif
聽 聽if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_HSCROLL )
聽 聽 聽 DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self
聽 聽endif
聽 聽oWnd:DefControl( Self )
return Self
//----------------------------------------------------------------------------//
METHOD Paint() CLASS TGantt
聽 聽local oRect := ::GetRect()
聽 聽if ::bPainted != nil
聽 聽 聽 Eval( ::bPainted, ::hDC )
聽 聽endif
return 0 //nil
//----------------------------------------------------------------------------//
METHOD Line( nTop, nLeft, nBottom, nRight, oPen ) CLASS TGantt
聽 聽local hPen := if( oPen = nil, 0, oPen:hPen )
聽 聽::GetDC()
聽 聽MoveTo( ::hDC, nLeft, nTop )
聽 聽LineTo( ::hDC, nRight, nBottom, hPen )
聽 聽::ReleaseDC()
return nil
//----------------------------------------------------------------------------//
METHOD Rectang( nTop, nLeft, nBottom, nRight, oPen,barra ) CLASS TGantt
聽 聽local hPen := if( oPen = nil, 0, oPen:hPen )
聽 聽Local nBar := if( barra = nil, 0, barra)
聽 聽::GetDC()
聽 聽 聽Rectangle( ::hDC, nTop, nLeft, nBottom, nRight, hPen )
聽 聽::ReleaseDC()
/*
聽 聽if nbar > 0
聽 聽 聽 if len(::aitems) >= nBar
聽 聽 聽 聽 聽::aitems[nbar]:={ntop,nleft,nBottom,nRight}
聽 聽 聽 else
聽 聽 聽 聽 聽AADD( ::aitems,{ntop,nleft,nBottom,nRight} )
聽 聽 聽 endif
聽 聽endif
*/
return nil
//----------------------------------------------------------------------------//
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
聽 聽 聽 聽 聽 聽 lTransparent, nAlign ) CLASS TGantt
聽 聽DEFAULT nClrFore := ::nClrText,;
聽 聽 聽 聽 聽 聽nClrBack := ::nClrPane,;
聽 聽 聽 聽 聽 聽oFont 聽 聽:= ::oFont,;
聽 聽 聽 聽 聽 聽lPixel 聽 := .f.,;
聽 聽 聽 聽 聽 聽lTransparent := .f.
聽 聽if ValType( nClrFore ) == "C" 聽 聽 聽// 聽xBase Color string
聽 聽 聽 nClrBack = nClrFore
聽 聽 聽 nClrFore = nGetForeRGB( nClrFore )
聽 聽 聽 nClrBack = nGetBackRGB( nClrBack )
聽 聽endif
聽 聽::GetDC()
聽 聽DEFAULT nAlign := GetTextAlign( ::hDC )
聽 聽WSay( ::hWnd, ::hDC, nRow, nCol, cValToChar( cText ), nClrFore, nClrBack,;
聽 聽 聽 聽 聽If( oFont != nil, oFont:hFont, 0 ), lPixel, lTransparent, nAlign )
聽 聽::ReleaseDC()
return nil
//------------------//
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TGantt
local neoitem,ctext
if ::lCaptured
聽 聽neoItem:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽val[2] <= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽val[4] >= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽val[3] >= nRow })
聽 聽 聽if neoItem = 0 .and. ( nRow<=::nrow1+2 .or. nRow>=::nrow2-1 ) .and.;
聽 聽 聽 聽 聽::nlCol .and. ::nRCol
聽 聽 聽 if nCol>nOldCol1 .and. nCol<nOldcol2 聽 聽 聽 聽
聽 聽 聽 聽 聽CURSOR("CURSOR_1")
聽 聽 聽 聽 聽::DibRect()
聽 聽 聽 聽 聽selectObject(::hDC,::hOldPen)
聽 聽 聽 聽 聽::ReleaseDC()
聽 聽 聽 聽 聽::lCaptured:=.f.
聽 聽 聽 聽 聽::lCaptuPre:=.t.
聽 聽 聽 聽 聽::nRowi1=::nRow2-1
聽 聽 聽 聽 聽::nColi1=nOldCol2
聽 聽 聽 聽 聽::nColi2=nCol
聽 聽 聽 聽 聽::nrowi2=nRow
聽 聽 聽 聽 聽nOldRow:=::nRow2-1
聽 聽 聽 聽 聽nOldRow2:=::nRow2-1
聽 聽 聽 聽 聽nOldCol:=nOldCol2
聽 聽 聽 聽 聽::nRowi2:=nOldRow2+(nRow-nOldRow)
聽 聽 聽 聽 聽::nColi2:=nOldCol2+(nCol-nOldCol)
聽 聽 聽 聽 聽::holdpen:=Selectobject(::hDC,::hTrazoPen)
聽 聽 聽 聽 聽::DibLine()
聽 聽 聽 聽 聽ReTurn 0
聽 聽 聽 聽endif
/*
聽 聽 聽 //----- Disegna TIP
聽 聽 聽 IF ::bInizioFine # nil
聽 聽 聽 聽 聽IF ::lCAmbiaDay
聽 聽 聽 聽 聽 聽 ::DestroyToolTip()
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽eval(::bInizioFine)
聽 聽 聽 聽 聽IF ! empty(::cTipIniFine)
聽 聽 聽 聽 聽 聽 cText := substr(::cTipIniFine,1,5) + ' al ' + 聽substr(::cTipIniFine,12,5)
聽 聽 聽 聽 聽 聽 ::ShowToolTip( ::nBoxBottom + 3 , ::nBoxLeft ,cText )
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 ENDIF
*/
聽 聽 聽endif
聽 聽::DibRect()
聽 聽 if ::nRCol .and. !::nLCol
聽 聽 聽 聽 聽CURSOR("CURSOR_2")
聽 聽 聽 聽if nOldCol2+(nCol-nOldCol) > ::ncol1
聽 聽 聽 聽 聽 ::nCol2:=nOldCol2+(nCol-nOldCol)
聽 聽 聽 聽endif
聽 聽 endif
聽 聽 if ::nlCol .and. !::nRCol
聽 聽 聽 聽 聽CURSOR("CURSOR_3")
聽 聽 聽 聽if nOldCol1+(nCol-nOldCol) < ::ncol2
聽 聽 聽 聽 聽::nCol1:=nOldCol1+(nCol-nOldCol)
聽 聽 聽 聽endif
聽 聽 endif
聽 聽 if ::nlCol .and. ::nRCol
聽 聽 聽 聽 聽CURSOR("CURSOR_4")
聽 聽 聽 聽 ::nCol1:=nOldCol1+(nCol-nOldCol)
聽 聽 聽 聽 ::nCol2:=nOldCol2+(nCol-nOldCol)
聽 聽 endif
聽 聽 ::DibRect()
聽 聽 ReTurn 0
endif
if ::lCaptuPre
聽 聽::DibLine()
聽 聽::nRowi2:=nOldRow2+(nRow-nOldRow)
聽 聽::nColi2:=nOldCol2+(nCol-nOldCol)
聽 聽::DibLine()
聽 聽::nItePre:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 val[2] <= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 val[4] >= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 val[3] >= nRow })
聽 聽 if ::nitepre!=0
聽 聽 聽 聽 Cursor("CURSOR_1")
聽 聽 else
// 聽 聽 聽 聽Super:MouseMove( nRow, nCol, nKeyFlags )
聽 聽 聽 聽 cursorarrow()
聽 聽 endif
聽 聽 ReTurn 0
endif
聽 聽::nItem:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽val[2] <= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽val[4]+5 >= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽val[3] >= nRow })
聽 聽if ::lcaptured
聽 聽 聽if ::nItem = 0
聽 聽 聽 聽 聽CURSOR("CURSOR_1")
聽 聽 聽 聽 聽::lCaptured:=.f.
聽 聽 聽 聽 聽::lCaptuPre:=.t.
聽 聽 聽endif
聽 聽endif
聽 聽if ::nItem !=0
聽 聽 聽 if ::aitems[::nitem][2] <= ncol .and. ::aitems[::nitem][2]+2 >=ncol
聽 聽 聽 聽 聽CURSOR("CURSOR_3")
// 聽 聽 聽 聽 Cursorwe()
聽 聽 聽 elseif ::aitems[::nitem][4]-3 <= ncol .and. ::aitems[::nitem][4] >=ncol
聽 聽 聽 聽 聽CURSOR("CURSOR_2")
// 聽 聽 聽 聽 Cursorwe()
聽 聽 聽 elseif ::aitems[::nitem][4]+2 <= ncol .and. ::aitems[::nitem][4]+5 >= ncol
聽 聽 聽 聽 聽Cursor("CURSOR_1") //cadema
聽 聽 聽 elseif ::aitems[::nitem][2] < ncol+2 .and. ::aitems[::nitem][4]-3 > ncol
聽 聽 聽 聽 聽CURSOR("CURSOR_4") //mover
聽 聽 聽 else
聽 聽 聽 聽 聽Cursorarrow()
// 聽 聽 聽 聽Super:MouseMove( nRow, nCol, nKeyFlags )
聽 聽 聽 endif
聽 聽 聽 IF ::bTrovaTip # nil
聽 聽 聽 聽 聽eval(::bTrovaTip,self)
聽 聽 聽 聽 聽IF ! empty(::cToolTip)
聽 聽 聽 聽 聽 聽 ::ltooltipBallon:=.t.
聽 聽 聽 聽 聽 聽 ::ntooltipwidth:=600
聽 聽 聽 聽 聽 聽 ::ntooltipTexColor:=RGB(0,0,0) //RGB(255,255,255)
聽 聽 聽 聽 聽 聽 ::ntooltipBkColor:=RGB(58,116,241) 聽//ColorPan() //
聽 聽 聽 聽 聽 聽 ::ntooltipIcon:=0
聽 聽 聽 聽 聽 聽 ::ShowToolTip( nRow, nCol,::cToolTip )
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 ENDIF
聽 聽else
聽 聽 聽 If ::bTrovaTip # nil
聽 聽 聽 聽 聽::DestroyToolTip()
聽 聽 聽 Endif
聽 聽 聽 聽 聽Cursorarrow()
// 聽 聽 聽Super:MouseMove( nRow, nCol, nKeyFlags )
聽 聽endif
Return 0
//---------------------------------------------------------//
METHOD LButtonDown( nRow, nCol, nKeyFlags ) CLASS TGantt
if ::bLbx!=NIL
聽 聽::Blbx:LbuttonDown( nRow+32, 40, nKeyFlags )
endif
::GetDC()
nOldCol:=nCol
nOldRow:=nRow
::nitem:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 val[2] <= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 val[4]+5 >= ncol .and. ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 val[3] >= nRow })
聽 聽if ::nitem !=0
聽 聽 聽 聽 聽::holdpen:=Selectobject(::hDC,::hTrazoPen)
聽 聽 聽 if ::aitems[::nitem][2] <= ncol .and. ::aitems[::nitem][2]+2 >=ncol
聽 聽 聽 聽 聽::lCaptured:=.t.
聽 聽 聽 聽 聽::nRow1=::aitems[::nitem][1] -2
聽 聽 聽 聽 聽::nCol1=::aitems[::nitem][2]
聽 聽 聽 聽 聽::nCol2=::aitems[::nitem][4]
聽 聽 聽 聽 聽::nrow2=::aitems[::nitem][3] +1
聽 聽 聽 聽 聽::nLcol:=.t.
聽 聽 聽 聽 聽::nRcol:=.f.
聽 聽 聽 聽 聽nOldCol1:=::nCol1
聽 聽 聽 聽 聽nOldCol2:=::nCol2
聽 聽 聽 聽 聽::DibRect()
聽 聽 聽 聽 聽CURSOR("CURSOR_3")
聽 聽 聽 elseif ::aitems[::nitem][4]-3 <= ncol .and. ::aitems[::nitem][4]>=ncol
聽 聽 聽 聽 聽::lCaptured:=.t.
聽 聽 聽 聽 聽::nRow1=::aitems[::nitem][1] -2
聽 聽 聽 聽 聽::nCol1=::aitems[::nitem][2]
聽 聽 聽 聽 聽::nCol2=::aitems[::nitem][4]
聽 聽 聽 聽 聽::nrow2=::aitems[::nitem][3] +1
聽 聽 聽 聽 聽::nLcol:=.f.
聽 聽 聽 聽 聽::nRcol:=.t.
聽 聽 聽 聽 聽nOldCol1:=::nCol1
聽 聽 聽 聽 聽nOldCol2:=::nCol2
聽 聽 聽 聽 聽::DibRect()
聽 聽 聽 聽 聽CURSOR("CURSOR_2")
聽 聽 聽 elseif ::aitems[::nitem][4]+2 <= ncol .and. ::aitems[::nitem][4]+5 > ncol
聽 聽 聽 聽 聽::lCaptured:=.f.
聽 聽 聽 聽 聽::lCaptuPre:=.t.
聽 聽 聽 聽 聽::nRowi1=nRow
聽 聽 聽 聽 聽::nColi1=nCol
聽 聽 聽 聽 聽::nColi2=nCol
聽 聽 聽 聽 聽::nrowi2=nRow
聽 聽 聽 聽 聽nOldRow2:=nRow
聽 聽 聽 聽 聽nOldCol2:=nCol
聽 聽 聽 聽 聽::DibLine()
聽 聽 聽 聽 聽Cursor("CURSOR_1")
聽 聽 聽 elseif ::aitems[::nitem][2] < ncol+2 .and. ::aitems[::nitem][4]-3 > ncol
聽 聽 聽 聽 聽::lCaptured:=.t.
聽 聽 聽 聽 聽::nRow1=::aitems[::nitem][1] -2
聽 聽 聽 聽 聽::nCol1=::aitems[::nitem][2]
聽 聽 聽 聽 聽::nCol2=::aitems[::nitem][4]
聽 聽 聽 聽 聽::nrow2=::aitems[::nitem][3] +1
聽 聽 聽 聽 聽::nLcol:=.t.
聽 聽 聽 聽 聽::nRcol:=.t.
聽 聽 聽 聽 聽nOldCol1:=::nCol1
聽 聽 聽 聽 聽nOldCol2:=::nCol2
聽 聽 聽 聽 聽::DibRect()
聽 聽 聽 聽 聽CURSOR("CURSOR_4")
聽 聽 聽 endif
聽 聽endif
聽 聽 聽 聽
RETURN Super:LButtonDown( nRow, nCol, nKeyFlags )
//------------------------------------------------------//
METHOD LButtonUp( nRow, nCol, nKeyFlags ) 聽CLASS TGantt
聽 聽::DestroyToolTip()
if ::lCaptured
聽 聽::DibRect()
聽 聽selectObject(::hDC,::hOldPen)
聽 聽::ReleaseDC()
聽 聽::lCaptuPre:=.f.
聽 聽::lCaptured:=.f.
聽 聽 if nOldCol1!=::nCol1 .or. ;
聽 聽 聽 聽nOldCol2!=::nCol2
聽 聽 聽 if ::bchange != NIL
聽 聽 聽 聽 聽eval(::bChange,Self)
聽 聽 聽 endif
聽 聽endif
endif
if ::lCaptuPre
聽 聽::DibLine()
聽 聽selectObject(::hDC,::hOldPen)
聽 聽::ReleaseDC()
聽 聽::lCaptured:=.f.
聽 聽::lCaptuPre:=.f.
聽 聽if ::nitepre !=0 .and. ::nItem != 0
聽 聽if ::nitepre != ::nItem
聽 聽if ::bPresed != NIL
聽 聽 聽 eval(::bPresed,Self)
聽 聽endif
聽 endif
聽 endif
聽 ::nItePre:=0
endif
/*
聽 聽 聽 IF ::bInizioFine # nil
聽 聽 聽 聽 聽::DestroyToolTip()
聽 聽 聽 endif
*/
Return Super:LButtonUp( nRow, nCol, nKeyFlags )
//----------------------------------------------------------------------------//
METHOD DibRect() CLASS TGantt
::iRop:=ClsetroP2(::hDC, 7)
聽 聽 聽 聽 聽 聽MoveTo( ::hDC, ::nCol1,::nRow1 聽)
聽 聽 聽 聽 聽 聽LineTo( ::hDC, ::nCol2,::nRow1 )
聽 聽 聽 聽 聽 聽LineTo( ::hDC, ::nCol2,::nRow2 )
聽 聽 聽 聽 聽 聽LineTo( ::hDC, ::nCol1,::nRow2 )
聽 聽 聽 聽 聽 聽LineTo( ::hDC, ::nCol1,::nRow1 )
ClseTroP2(::hDC,::iRop)
RETURN NIL
//----------------------------//
METHOD DibLine() CLASS TGantt
聽 聽::iRop:=ClsetroP2(::hDC, 7)
聽 聽 聽 聽 聽 聽MoveTo( ::hDC, ::nColi1,::nRowi1 聽)
聽 聽 聽 聽 聽 聽LineTo( ::hDC, ::nColi2,::nRowi2 )
聽 聽ClseTroP2(::hDC,::iRop)
RETURN NIL
//-----------------------------//
METHOD End() CLASS TGantt
聽 聽deleteobject(::hTrazoPen)
聽 聽Super:End()
RETURN NIL
//--------------------------------------//
METHOD LDblClick( nRow, nCol, nKeyFlags )
聽 聽::lCaptured:=.f.
聽 聽::lCaptuPre:=.f.
聽 聽if ::bLbx!=NIL
聽 聽 聽 ::blbx:LDblClick( nRow, nCol, nKeyFlags )
聽 聽endif
聽 聽Super:LDblClick( nRow, nCol, nKeyFlags ) 聽 聽
Return NIL
//-----------------------------------------------------//
METHOD _FillRect (aCols, oBrush,barra) CLASS TGantt
聽 聽Local nBar := if( barra = nil, 0, barra)
聽 聽::GetDC()
聽 聽 聽 FillRect(::hDC ,aCols, oBrush:hBrush)
聽 聽::ReleaseDC()
聽 聽if nbar > 0
聽 聽 聽 if len(::aitems) >= nBar
聽 聽 聽 聽 聽::aitems[nbar]:={aCols[1],aCols[2],aCols[3],aCols[4]}
聽 聽 聽 else
聽 聽 聽 聽 聽AADD( ::aitems,{aCols[1],aCols[2],aCols[3],aCols[4]} )
聽 聽 聽 endif
聽 聽endif
return NIL//----------------------------------------------------------------------------//
// GANTT
#xcommand @ <nRow>, <nCol> GANTT [<oGantt>] ;
聽 聽 聽 聽 聽 聽 聽[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
聽 聽 聽 聽 聽 聽 聽[ SIZE <nWidth>, <nHeight> ] ;
聽 聽 聽 聽 聽 聽 聽[ <border: BORDER>] ;
聽 聽 聽 聽 聽 聽 聽[ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
聽 聽 聽 聽 聽 聽 聽[ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
聽 聽 聽 聽 聽 聽 聽[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
聽 聽 聽 聽 聽 聽 聽[ 聽ON CHANGE <uChange> ] ;
聽 聽 聽 聽 聽 聽 聽[ 聽ON PRESED <uPresed> ] ;
聽 聽 聽 聽 聽 聽 聽[ 聽BOXLIS <uLbx> ] ;
聽 聽 聽 聽=> ;
聽 聽 聽 聽 聽 [<oGantt> := ] TGantt():New( <nRow>, <nCol>, <nWidth>, <nHeight>, <oWnd>,;
聽 聽 聽 聽 聽 聽 聽<.border.>, [<.vScroll.>], [<.hScroll.>], <nClrFore>,;
聽 聽 聽 聽 聽 聽 聽<nClrBack>,[<{uChange}>],[<{uPresed}>],<uLbx> )
#xcommand REDEFINE GANTT [<oGantt>] ;
聽 聽 聽 聽 聽 聽 聽[ ID <nId> ] ;
聽 聽 聽 聽 聽 聽 聽[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
聽 聽 聽 聽 聽 聽 聽[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
聽 聽 聽 聽=> ;
聽 聽 聽 聽 聽 [ <oGantt> := ] TGantt():Redefine( <nId>, <oWnd>,;
聽 聽 聽 聽 聽 聽 聽<nClrFore>, <nClrBack> )#include <windows.h>
#include <hbapi.h>
HB_FUNC( CLSETROP2 ) // ( hDll, Ctex )
{
聽 聽hb_retni( 聽SetROP2( ( HDC ) hb_parnl( 1 ), hb_parni( 2 ) ) );
}