[Perl-win32-gui-cvscommit] Win32-GUI-Scintilla/Include - New directory

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23550/Include

Log Message:
Directory /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Include added to the 
repository





[Perl-win32-gui-cvscommit] Win32-GUI-Scintilla/Samples - New directory

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23550/Samples

Log Message:
Directory /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Samples added to the 
repository





[Perl-win32-gui-cvscommit] Win32-GUI-Scintilla/Samples Editor.pl,NONE,1.1 test.pl,NONE,1.1 test2.pl,NONE,1.1

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23874/Samples

Added Files:
Editor.pl test.pl test2.pl 
Log Message:
Added to repository

--- NEW FILE: test2.pl ---
# perl -w
use Win32::GUI;
use Win32::GUI::Scintilla;
use Win32::GUI::Scintilla::Perl;

# main Window
$Window = new Win32::GUI::Window (
-name => "Window",
-title=> "Scintilla test",
-pos  => [100, 100],
-size => [400, 400],
) or die "new Window";

# Create Scintilla Edit Window
# $Edit = new Win32::GUI::Scintilla  (
#   -parent  => $Window,
# Or
$Edit = $Window->AddScintillaPerl  (
   -name=> "Edit",
   -pos => [0, 0],
   -size=> [400, 400],
   -text=> "my \$Test\n",
) or die "new Edit";

# Call Some method
$Edit->AddText ("if (\$i == 1) {\n \$i++;\n}\n");

# Event loop
$Window->Show();
Win32::GUI::Dialog();

# Main window event handler
sub Window_Terminate {
 return -1;
}

# Main window resize
sub Window_Resize {

  if (defined $Window) {
($width, $height) = ($Window->GetClientRect)[2..3];
$Edit->Resize ($width, $height);
  }
}

# Scintilla Event Notification
sub Edit_Notify {

  my (%evt) = @_;
  print "Edit Notify = ", %evt, "\n";
}


--- NEW FILE: test.pl ---
# perl -w
use Win32::GUI;
use Win32::GUI::Scintilla;

# main Window
$Window = new Win32::GUI::Window (
-name => "Window",
-title=> "Scintilla test",
-pos  => [100, 100],
-size => [400, 400],
) or die "new Window";

$Edit = $Window->AddButton  (
-name => "Test",
-text => "Test",
-pos  => [0, 0],
-size => [100, 10],
);

# Create Scintilla Edit Window
# $Edit = new Win32::GUI::Scintilla  (
#   -parent  => $Window,
# Or
$Edit = $Window->AddScintilla  (
   -name=> "Edit",
   -pos => [0, 10],
   -size=> [400, 400],
   -text=> "Test\n",
) or die "new Edit";

# Call Some method
$Edit->AddText ("add\n");
$Edit->AppendText ("append\n");

# Event loop
$Window->Show();
Win32::GUI::Dialog();

# Main window event handler
sub Window_Terminate {
 # Call Some method
 print "GetText = ", $Edit->GetText(), "\n";
 print "GetLine(1) = ", $Edit->GetLine(1), "\n";
 print "GetSelText = ", $Edit->GetSelText(), "\n";
 print "GetTextRange(2) = ", $Edit->GetTextRange(2), "\n";
 print "GetTextRange(2, 6) = ", $Edit->GetTextRange(2, 6), "\n";
 return -1;
}
# Main window resize
sub Window_Resize {

  if (defined $Window) {
($width, $height) = ($Window->GetClientRect)[2..3];
$Edit->Move   (0, 10);
$Edit->Resize ($width, $height-10);
  }
}

# Scintilla Event Notification
sub Edit_Notify {

  my (%evt) = @_;
 # print "Edit Notify = ", %evt, "\n";
}


sub Edit_Change {
  print "Change!!!\n";
}

sub Edit_GotFocus {
  print "GotFocus!!!\n";
}

sub Edit_LostFocus {
  print "LostFocus!!!\n";
}

--- NEW FILE: Editor.pl ---
# Perl Editor
#---
# perl -v
use strict;
use Cwd;
use Win32::GUI;
use Win32::GUI::Scintilla;

my $VERSION = "1.0alpha1";
my $CurrentFile = "";
my $Directory = cwd;

my %faces = ( 'times'  => 'Times New Roman',
  'mono'   => 'Courier New',
  'helv'   => 'Lucida Console',
  'lucida' => 'Lucida Console',
  'other'  => 'Comic Sans MS',
  'size'   => '10',
  'size2'  => '9',
  'backcol'=> '#FF',
);

my $PERL_KEYWORD = q{
NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD
BEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept
alarm and atan2 bind binmode bless caller chdir chmod chomp chop
chown chr chroot close closedir cmp connect continue cos crypt
dbmclose dbmopen defined delete die do dump each else elsif endgrent
endhostent endnetent endprotoent endpwent endservent eof eq eval
exec exists exit exp fcntl fileno flock for foreach fork format
formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname
gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername
getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent
getpwent getpwnam getpwuid getservbyname getservbyport getservent
getsockname getsockopt glob gmtime goto grep gt hex if index
int ioctl join keys kill last lc lcfirst le length link listen
local localtime lock log lstat lt m map mkdir msgctl msgget msgrcv
msgsnd my ne next no not oct open opendir or ord our pack package
pipe pop pos print printf prototype push q qq qr quotemeta qu
qw qx rand read readdir readline readlink readpipe recv redo
ref rename require reset return reverse rewinddir rindex rmdir
s scalar seek seekdir select semctl semget semop send setgrent
sethostent setnetent setpgrp setpriority setprotoent setpwent
setservent setsockopt shift shmctl shmget shmread shmwrite shutdown
sin sleep socket socketpair sort splice split sprin

[Perl-win32-gui-cvscommit] Win32-GUI-Scintilla/Include Readme.txt,NONE,1.1 SciLexer.dll,NONE,1.1 Scintilla.h,NONE,1.1 Scintilla.iface,NONE,1.1 autogen.pl,NONE,1.1

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23874/Include

Added Files:
Readme.txt SciLexer.dll Scintilla.h Scintilla.iface autogen.pl 
Log Message:
Added to repository

--- NEW FILE: Scintilla.iface ---
## First line may be used for shbang

## This file defines the interface to Scintilla

## Copyright 2000-2003 by Neil Hodgson <[EMAIL PROTECTED]>
## The License.txt file describes the conditions under which this software may 
be distributed.

## A line starting with ## is a pure comment and should be stripped by readers.
## A line starting with #! is for future shbang use
## A line starting with # followed by a space is a documentation comment and 
refers
## to the next feature definition.

## Each feature is defined by a line starting with fun, get, set, val or evt.
## cat -> start a category
## fun -> a function
## get -> a property get function
## set -> a property set function
## val -> definition of a constant
## evt -> an event
[...2399 lines suppressed...]
evt void URIDropped=2015(string text)
evt void DwellStart=2016(int position)
evt void DwellEnd=2017(int position)
evt void Zoom=2018(void)
evt void HotSpotClick=2019(int modifiers, int position)
evt void HotSpotDoubleClick=2020(int modifiers, int position)
evt void CallTipClick=2021(int position)

cat Deprecated

# CARET_POLICY changed in 1.47
fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
val CARET_CENTER=0x02
val CARET_XEVEN=0x08
val CARET_XJUMPS=0x10

# The old name for SCN_UPDATEUI
val SCN_CHECKBRACE=2007
evt void PosChanged=2012(int position)


--- NEW FILE: Readme.txt ---
Scilexer.dll: Scintilla control with lexer.
Scintilla.h : C include file of Scintilla control.
Scintilla.iface : Interface desciption of Scintilla control.
Autogen.pl  : Build Scintilla.pm from Scintilla.pm.begin, Scintilla.pm.end 
and Scintilla.iface.
--- NEW FILE: autogen.pl ---
#! perl

open G, ">Scintilla.pm" or return 1;

# Add Startup
open F, " )
{
  print G $_;
}
close F;

# Build Scintilla interface
open F, " )
{
  #--- Constant ---
  if (/^val (.*)=(.*)$/)
  {
print G "use constant $1 => $2 ;\n";
  }
  #--- Get ---
  elsif (/^get colour (.*)=(.*)\(,\)$/ )
  {
print G "sub $1 {\n  my \$self = shift;\n  my \$colour = 
\$self->SendMessage ($2, 0, 0);\n  \$colour = sprintf ('#%x', \$colour);\n  
\$colour =~ s/(.)(..)(..)(..)/\$1\$4\$3\$2/;\n  return \$colour;\n}\n";
  }
  elsif (/^get colour (.*)=(.*)\(int (.*),\)$/ )
  {
print G "sub $1 {\n  my (\$self, \$$3) = [EMAIL PROTECTED];\n  my \$colour 
= \$self->SendMessage ($2, \$$3, 0);\n  \$colour = sprintf ('#%x', \$colour);\n 
 \$colour =~ s/(.)(..)(..)(..)/\$1\$4\$3\$2/;\n  return \$colour;\n}";
  }
  elsif (/^get (.*) (.*)=(.*)\(,\)$/ )
  {
print G "sub $2 {\n  my \$self = shift;\n  return \$self->SendMessage ($3, 
0, 0);\n}\n";
  }
  elsif (/^get int GetCharAt=2007\(position pos,\)$/ )
  {
print G "sub GetCharAt {\n  my (\$self, \$pos) = [EMAIL PROTECTED];\n  
return chr \$self->SendMessage (2007, \$pos, 0);\n}\n";
  }
  elsif (/^get (.*) (.*)=(.*)\(position (.*),\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, 0);\n}\n";
  }
  elsif (/^get (.*) (.*)=(.*)\(int (.*),\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, 0);\n}\n";
  }
  elsif (/^get (.*) (.*)=(.*)\(int (.*), int (.*)\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4, \$$5) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, \$$5);\n}\n";
  }
  #--- Set ---
  elsif (/^set (.*) (.*)=(.*)\(,\)$/ )
  {
print G "sub $2 {\n  my \$self = shift;\n  return \$self->SendMessage ($3, 
0, 0);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(bool (.*),\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, 0);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(int (.*),\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, 0);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(position (.*),\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, 0);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(colour (.*),\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4) = [EMAIL PROTECTED];\n  \$$4 =~ 
s/.(..)(..)(..)/\$3\$2\$1/;\n  return \$self->SendMessage ($3, int hex \$$4, 
0);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(int (.*), int (.*)\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4, \$$5) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, \$$5);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(int (.*), bool (.*)\)$/ )
  {
print G "sub $2 {\n  my (\$self, \$$4, \$$5) = [EMAIL PROTECTED];\n  return 
\$self->SendMessage ($3, \$$4, \$$5);\n}\n";
  }
  elsif (/^set (.*) (.*)=(.*)\(bool (.*), colour (.*)\)$/ )
  {
  

[Perl-win32-gui-cvscommit] Win32-GUI-Scintilla Changes,NONE,1.1 MANIFEST,NONE,1.1 Makefile.PL,NONE,1.1 Perl.pm,NONE,1.1 README,NONE,1.1 Scintilla.html,NONE,1.1 Scintilla.pm,NONE,1.1 Scintilla.pm.begin

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Scintilla
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23874

Added Files:
Changes MANIFEST Makefile.PL Perl.pm README Scintilla.html 
Scintilla.pm Scintilla.pm.begin Scintilla.pm.end Scintilla.xs 
Typemap 
Log Message:
Added to repository

--- NEW FILE: Makefile.PL ---
use ExtUtils::MakeMaker;

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME'  => 'Win32::GUI::Scintilla',
'VERSION_FROM'  => 'Scintilla.pm.begin', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
'PM' => {
'Scintilla.pm'  => '$(INST_LIBDIR)/Scintilla.pm',
'Perl.pm'   => '$(INST_LIBDIR)/Scintilla/Perl.pm',
},
($] >= 5.005 ?## Add these new keywords supported since 5.005
  (ABSTRACT => 'Add Scintilla control to Win32::GUI',
   AUTHOR   => 'ROCHER Laurent ([EMAIL PROTECTED])') : ()),
'LIBS'  => [''], # e.g., '-lm'
'DEFINE'=> '', # e.g., '-DHAVE_SOMETHING'
# Insert -I. if you add *.h files later:
'INC'   => '', # e.g., '-I/usr/include/other'
# Un-comment this if you add C files to link with later:
# 'OBJECT'  => '$(O_FILES)', # link all the C files too
);

sub MY::postamble {

return <<'MAKE_FRAG';

Scintilla.pm : Scintilla.pm.begin Scintilla.pm.end include/Scintilla.iface 
include/autogen.pl
$(PERL) ./include/autogen.pl

config :: $(INST_ARCHAUTODIR)/SciLexer.dll
@$(NOOP)

$(INST_ARCHAUTODIR)/SciLexer.dll : include/SciLexer.dll
$(CP) ./include/SciLexer.dll $(INST_ARCHAUTODIR)/SciLexer.dll

MAKE_FRAG
}

--- NEW FILE: Scintilla.pm.begin ---
#
# Scintilla control for Win32::GUI
# by Laurent ROCHER ([EMAIL PROTECTED])
#
#perl2exe_bundle 'SciLexer.dll'

package Win32::GUI::Scintilla;

use vars qw($ABSTRACT $VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Win32::GUI;
use Config;

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader Win32::GUI::Window);

$VERSION = '1.7';

bootstrap Win32::GUI::Scintilla $VERSION;

#

# Load Scintilla DLL from perl directory or standard LoadLibrary search
my $SCILEXER_PATH = $Config{'installsitelib'} . 
'\auto\Win32\GUI\Scintilla\SciLexer.DLL';
my $SCINTILLA_DLL = Win32::GUI::LoadLibrary($SCILEXER_PATH) || 
Win32::GUI::LoadLibrary('SciLexer.DLL');

Win32::GUI::Scintilla::_Initialise();

END {
  # Free Scintilla DLL
  Win32::GUI::FreeLibrary($SCINTILLA_DLL);
  Win32::GUI::Scintilla::_UnInitialise();
}

#

#
# Notify event code
#

use constant SCN_STYLENEEDED=> 2000;
use constant SCN_CHARADDED  => 2001;
use constant SCN_SAVEPOINTREACHED   => 2002;
use constant SCN_SAVEPOINTLEFT  => 2003;
use constant SCN_MODIFYATTEMPTRO=> 2004;
use constant SCN_KEY=> 2005;
use constant SCN_DOUBLECLICK=> 2006;
use constant SCN_UPDATEUI   => 2007;
use constant SCN_MODIFIED   => 2008;
use constant SCN_MACRORECORD=> 2009;
use constant SCN_MARGINCLICK=> 2010;
use constant SCN_NEEDSHOWN  => 2011;
use constant SCN_PAINTED=> 2013;
use constant SCN_USERLISTSELECTION  => 2014;
use constant SCN_URIDROPPED => 2015;
use constant SCN_DWELLSTART => 2016;
use constant SCN_DWELLEND   => 2017;
use constant SCN_ZOOM   => 2018;
use constant SCN_HOTSPOTCLICK   => 2019;
use constant SCN_HOTSPOTDOUBLECLICK => 2020;
use constant SCN_CALLTIPCLICK   => 2021;

#

#
# New scintilla control
#

sub new {

  my $class  = shift;

  my (%in)   = @_;
  my %out;

  ### Filtering option
  for my $option qw(
-name -parent
-left -top -width -height -pos -size
-pushstyle -addstyle -popstyle -remstyle -notstyle -negstyle
-exstyle -pushexstyle -addexstyle -popexstyle -remexstyle -notexstyle
) {
$out{$option} = $in{$option} if exists $in{$option};
  }

  ### Default window
  my $constant = Win32::GUI::constant("WIN32__GUI__STATIC", 0);
  $out{-style} = WS_CLIPCHILDREN;
  $out{-class} = "Scintilla";

  ### Window style
  $out{-style} |= WS_TABSTOP unless exists $in{-tabstop} && $in{-tabstop} == 0; 
#Default to -tabstop => 1
  $out{-style} |= WS_VISIBLE unless exists $in{-visible} && $in{-visible} == 0; 
#Default to -visible => 1
  $out{-style} |= WS_HSCROLL if exists $in{-hscroll} && $in{-hscroll} == 1;
  $out{-style} |= WS_VSCROLL if exists $in{-vscroll} && $in{-vscroll} == 1;

  my $self = Win32::GUI->_new($constant, $c

[Perl-win32-gui-cvscommit] Win32-GUI-AxWindow/Samples - New directory

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-AxWindow/Samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15316/Samples

Log Message:
Directory /cvsroot/perl-win32-gui/Win32-GUI-AxWindow/Samples added to the 
repository





[Perl-win32-gui-cvscommit] Win32-GUI-AxWindow/Samples/UnComplete - New directory

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-AxWindow/Samples/UnComplete
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15339/UnComplete

Log Message:
Directory /cvsroot/perl-win32-gui/Win32-GUI-AxWindow/Samples/UnComplete added 
to the repository





[Perl-win32-gui-cvscommit] Win32-GUI-AxWindow/Samples/UnComplete MsFlexGrid.pm,NONE,1.1

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-AxWindow/Samples/UnComplete
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455/Samples/UnComplete

Added Files:
MsFlexGrid.pm 
Log Message:
Added to repository

--- NEW FILE: MsFlexGrid.pm ---
#
#  Win32::GUI::MsFlexGrid: wrapper package for MsFlexGrid ActiveX
#by Laurent Rocher.
#
#

use strict;
use vars qw(@ISA $VERSION);
use Carp 'croak','carp';

use Win32::GUI::AxWindow;

@ISA = qw(Win32::GUI::AxWindow Exporter);

$VERSION = "1.0";

BEGIN {
use Exporter();
use vars qw(@EXPORT);
[...1680 lines suppressed...]

# VARIANT_BOOL RightToLeft() / void RightToLeft([in] VARIANT_BOOL rhs)
# Determines text display direction and control visual appearance on a 
bidirectional system.
sub RightToLeft {

  croak("Usage: VARIANT_BOOL RightToLeft() / void RightToLeft([in] VARIANT_BOOL 
rhs)") if (@_ != 1 && @_ != 2);

  my ($self, $value) = @_;

  if (defined $value) {
return $self->SUPER::SetProperty (0xfd9d, $value);
  }
  else {
return $self->SUPER::GetProperty (0xfd9d);
  }
}

1;

__END__




[Perl-win32-gui-cvscommit] Win32-GUI-AxWindow AxWindow.html,NONE,1.1 AxWindow.pm,NONE,1.1 AxWindow.xs,NONE,1.1 Changes,NONE,1.1 MANIFEST,NONE,1.1 Makefile.PL,NONE,1.1 README,NONE,1.1 TYPEMAP,NONE,1.1

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-AxWindow
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455

Added Files:
AxWindow.html AxWindow.pm AxWindow.xs Changes MANIFEST 
Makefile.PL README TYPEMAP 
Log Message:
Added to repository

--- NEW FILE: AxWindow.pm ---
package Win32::GUI::AxWindow;

use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use Win32::GUI;

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader Win32::GUI::Window);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw();
$VERSION = '0.07';

bootstrap Win32::GUI::AxWindow $VERSION;

# Preloaded methods go here.

# Initialise

Win32::GUI::AxWindow::_Initialise();

# DeInitialise

END {
  Win32::GUI::AxWindow::_DeInitialise();
}

# Autoload methods go after =cut, and are processed by the autosplit program.

#
#  new : Create a new ActiveX Window
#

sub new {

  my $class  = shift;
  my %in = @_;

  ### Control option
  croak("-parent undefined")  unless exists $in{-parent};
  croak("-name undefined")unless exists $in{-name};
  croak("-control undefined") unless exists $in{-control};

  my $parent = $in{-parent};
  my $name   = $in{-name};
  my $clsid  = $in{-control};

  # print "Parent = $parent->{-name}\n";
  # print "Name = $name\n";
  # print "Control = $clsid\n";

  ### Size
  my ($x, $y, $w, $h) = (0,0,1,1);

  $x = $in{-left}   if exists $in{-left};
  $y = $in{-top}if exists $in{-top};
  $w = $in{-width}  if exists $in{-width};
  $h = $in{-height} if exists $in{-height};
  ($x, $y) = ($in{-pos}[0] , $in{-pos}[1]) if exists $in{-pos};
  ($w, $h) = ($in{-size}[0],$in{-size}[1]) if exists $in{-size};
  # print "(x,y) = ($x,$y)\n(w,h) = ($w,$h)\n";

  ### Window Style
  my $style = WS_CHILD | WS_CLIPCHILDREN;

  $style  = $in{-style} if exists $in{-style};
  $style |= $in{-pushstyle} if exists $in{-pushstyle};
  $style ^= $in{-popstyle}  if exists $in{-popstyle};
  $style |= $in{-addstyle}  if exists $in{-addstyle};
  $style ^= $in{-remstyle}  if exists $in{-remstyle};

  $style |= WS_VISIBLE  unless exists $in{-visible} && $in{-visible} == 0;
  $style |= WS_TABSTOP  unless exists $in{-tabstop} && $in{-tabstop} == 0;
  $style |= WS_DISABLED if exists $in{-enable} && $in{-enable} == 0;
  $style |= WS_HSCROLL  if exists $in{-hscroll} && $in{-hscroll} == 1;
  $style |= WS_VSCROLL  if exists $in{-vscroll} && $in{-vscroll} == 1;

  # print "Style = $style\n";

  ### Window ExStyle
  my $exstyle = 0;

  $exstyle = $in{-exstyle}  if exists $in{-exstyle};
  $exstyle |= $in{-pushexstyle} if exists $in{-pushexstyle};
  $exstyle ^= $in{-popexstyle}  if exists $in{-popexstyle};
  $exstyle |= $in{-addexstyle}  if exists $in{-addexstyle};
  $exstyle ^= $in{-remexstyle}  if exists $in{-remexstyle};

  # print "ExStyle = $exstyle\n";

  ### Create Window and ActiveX Object
  my $self = {};
  bless $self, $class;

  if ( $self->_Create($parent, $clsid, $style, $exstyle, $x, $y, $w, $h) )
  {
### Store Data (Win32::GUI glue)
$self->{-name}   = $in{-name};
$parent->{$name} = $self;

return $self;
  }

  return undef;
}

#
# CallMethod : Use Invoke with DISPATCH_METHOD
#

sub CallMethod {
  my $self = shift;

  return $self->Invoke (0x01, @_);
}

#
# GetProperty : Use Invoke with DISPATCH_PROPERTYGET
#

sub GetProperty {

  my $self = shift;

  return $self->Invoke (0x02, @_);
}

#
# PutProperty : Use Invoke with DISPATCH_PROPERTYPUT
#

sub SetProperty {

  my $self = shift;

  return $self->Invoke (0x04, @_);
}


1;
__END__
# Below is the stub of documentation for your module. You better edit it!

=head1 NAME

Win32::GUI::AxWindow - Perl extension for Hosting ActiveX Control in Win32::GUI

=head1 SYNOPSIS

  use Win32::GUI;
  use Win32::GUI::AxWindow;

  # Main Window
  $Window = new Win32::GUI::Window (
   -name => "Window",
   -title=> "Win32::GUI::AxWindow test",
   -post => [100, 100],
   -size => [400, 400],
  );

  # Add a WebBrowser AxtiveX
  $Control = new Win32::GUI::AxWindow  (
-parent  => $Window,
-name=> "Control",
-control => "Shell.Explorer.2",
# -control => "{8856F961-340A-11D0-A96B-00C04FD705A2}",
-pos => [0, 0],
-size=> [400, 400],
  );

  # Register some event
  $Control->RegisterEvent("StatusTextChange",
   sub {
   $self= shift;
   $eventid = shift;
   print "Event : ", @_, "\n";
} );

  # Call Method
  $Control->CallMethod("Navigate", 'http://www.perl.com/');

  # Event loop
  $Window->Show();
  Win32::GUI::Dialog();

  # Main window 

[Perl-win32-gui-cvscommit] Win32-GUI-AxWindow/Samples DHtmlEdit.pl,NONE,1.1 DHtmlEdit.pm,NONE,1.1 DHtmlEditor.pl,NONE,1.1 Google.pl,NONE,1.1 Info.bat,NONE,1.1 InfoControl.pl,NONE,1.1 MShtml.pl,NONE,1.

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-AxWindow/Samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455/Samples

Added Files:
DHtmlEdit.pl DHtmlEdit.pm DHtmlEditor.pl Google.pl Info.bat 
InfoControl.pl MShtml.pl Movie.avi MovieControl.pl 
MsFlexGrid.pl SCGrid.pl TestOLE.pl WebBrowser.pl 
Log Message:
Added to repository

--- NEW FILE: MsFlexGrid.pl ---
# perl -w
#
#  Hosting MsFlexGrid : Test Indexed properties
#
use Cwd;
use Win32::GUI;
use Win32::GUI::AxWindow;

# main Window
$Window = new Win32::GUI::Window (
-title=> "Win32::GUI::AxWindow test",
-pos => [100, 100],
-size=> [400, 400],
-name => "Window",
) or die "new Window";

# Create AxWindow
$Control = new Win32::GUI::AxWindow  (
   -parent  => $Window,
   -name=> "Control",
   -pos => [0, 0],
   -size=> [400, 400],
   -control => "MSFlexGridLib.MSFlexGrid",
 ) or die "new Control";

# Test Enum property set by string value
# $Control->SetProperty("ScrollBars", "flexScrollBarNone");
# $Control->SetProperty("GridLines", "flexGridInset");

$Control->SetProperty("Rows", 5);
$Control->SetProperty("Cols", 5);

$Control->SetProperty("TextMatrix", 1, 2, "Hello!!!");

$r = $Control->GetProperty("Rows");
$c = $Control->GetProperty("Cols");
$t = $Control->GetProperty("TextMatrix", 1, 2);
print "Rows = $r, Cols = $c, TextMatrix(1,2) = $t\n";

# Event loop
$Window->Show();
Win32::GUI::Dialog();

# Main window event handler

sub Window_Terminate {

  return -1;
}

sub Window_Resize {

  if (defined $Window) {
($width, $height) = ($Window->GetClientRect)[2..3];
$Control->Move   (0, 0);
$Control->Resize ($width, $height);
  }
}

--- NEW FILE: Movie.avi ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: WebBrowser.pl ---
# perl -w
#
#  Hosting a WebBrowser
#Create a WebBrowser and register an event.
#Enumerate Property, Methods and Events and create a Html file.
#Load Html file in WebBrowser.
#
use Cwd;
use Win32::GUI;
use Win32::GUI::AxWindow;

# main Window
$Window = new Win32::GUI::Window (
-title=> "Win32::GUI::AxWindow test",
-pos => [100, 100],
-size=> [400, 400],
-name => "Window",
) or die "new Window";

# Create AxWindow
$Control = new Win32::GUI::AxWindow  (
   -parent  => $Window,
   -name=> "Control",
   -pos => [0, 0],
   -size=> [400, 400],
   -control => "Shell.Explorer.2",
#   -control => "{8856F961-340A-11D0-A96B-00C04FD705A2}",
 ) or die "new Control";

# Register Event

$Control->RegisterEvent("StatusTextChange", sub { $self = shift; $id = shift; 
print "Event : ", @_, "\n"; } );

# Enum Property info

open (F, ">Webbrowser.html") or die "open";
print F 'Properties';

foreach $id ($Control->EnumPropertyID()) {

  %property = $Control->GetPropertyInfo ($id);

  foreach $key (keys %property) {
print F "$key = ", $property {$key}, "";
  }

  print F "";
}

# Enum Method info

print F "Methods";

foreach $id ($Control->EnumMethodID()) {

  %method = $Control->GetMethodInfo ($id);

  foreach $key (keys %method) {
print F "$key = ", $method {$key}, "";
  }

  print F "";
}

# Enum Event info

print F "Events";

foreach $id ($Control->EnumEventID()) {

  %event = $Control->GetEventInfo ($id);

  foreach $key (keys %event) {
print F "$key = ", $event {$key}, "";
  }

  print F "";
}

print F "";
close (F);

# Method call
$dir  = cwd;
$path = "file://$dir/Webbrowser.html";

# print $path, "\n";
$Control->CallMethod("Navigate", $path);

# Event loop
$Window->Show();
Win32::GUI::Dialog();


# Main window event handler

sub Window_Terminate {

  return -1;
}

sub Window_Resize {

  if (defined $Window) {
($width, $height) = ($Window->GetClientRect)[2..3];
$Control->Move   (0, 0);
$Control->Resize ($width, $height);
  }
}

--- NEW FILE: DHtmlEdit.pm ---
#
#  Win32::GUI::DHtmlEdit : wrapper package for DHtmlEdit ActiveX
#by Laurent Rocher.
#
#  TODO : Check ExecuteCommand (Some commande have parametre)
#  TODO : Check QueryStatus (Usefull for all)
#
package Win32::GUI::DHtmlEdit;

use strict;
use vars qw(@ISA $VERSION);
use Carp 'croak','carp';

use Win32::GUI::AxWindow;

@ISA = qw(Win32::GUI::AxWindow Exporter);

$VERSION = "1.0";

[...1362 lines suppressed...]

  my ($self, $callback) = @_;

  $self->RegisterEvent ("onblur", $callback);
}

#
# onreadystatechange
#

sub OnReadyStateChange {

  croak("Usage: OnReadyStateChange (CallBack)") if (@_ != 2);

  my ($self, $callback) = @_;

  $self->RegisterEvent ("onreadystatechange", $callback);
}

1;

--- NEW FILE: DHtmlEdit.pl ---
# perl -w
#
#  Hosting DHtmlEdit basic 
#

use Cwd;
use Win32::GUI;
use Win32::GUI::AxWindow;

# main Window
$Window = new Win32::GUI::Window (
-name => "Window",
-title=> "Win32::GUI::AxWindow test",
-pos  => [100, 100],
-size  

[Perl-win32-gui-cvscommit] Win32-GUI-Grid/MFCGrid - New directory

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Grid/MFCGrid
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15758/MFCGrid

Log Message:
Directory /cvsroot/perl-win32-gui/Win32-GUI-Grid/MFCGrid added to the repository





[Perl-win32-gui-cvscommit] Win32-GUI-Grid/samples - New directory

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Grid/samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15758/samples

Log Message:
Directory /cvsroot/perl-win32-gui/Win32-GUI-Grid/samples added to the repository





[Perl-win32-gui-cvscommit] Win32-GUI-Grid/samples one.bmp,NONE,1.1 test1.pl,NONE,1.1 test2.pl,NONE,1.1 test3.pl,NONE,1.1 test4.pl,NONE,1.1 test5.pl,NONE,1.1 test6.pl,NONE,1.1 three.bmp,NONE,1.1 two.bm

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Grid/samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15861/samples

Added Files:
one.bmp test1.pl test2.pl test3.pl test4.pl test5.pl test6.pl 
three.bmp two.bmp 
Log Message:
Added to repository

--- NEW FILE: test5.pl ---
#! perl -w
#
# - Custom Cell Type
# - Sort function
#
use strict;
use Win32::GUI;
use Win32::GUI::Grid;

# main Window
my $Window = new Win32::GUI::Window (
-title=> "Win32::GUI::Grid test 5",
-pos => [100, 100],
-size=> [400, 400],
-name => "Window",
) or die "new Window";

# Grid Window
my $Grid = new Win32::GUI::Grid (
-parent  => $Window,
-name=> "Grid",
-pos => [0, 0],
) or die "new Grid";

# Grid cell base
$Grid->SetDefCellType(GVIT_NUMERIC);  # Preset Cell type before cell creation

# Init Grid
$Grid->SetEditable(1);
$Grid->SetRows(10);
$Grid->SetColumns(10);
$Grid->SetFixedRows(1);
$Grid->SetFixedColumns(1);

# Fill Grid
for my $row (0..$Grid->GetRows()) {
  for my $col (0..$Grid->GetColumns()) {
if ($row == 0) {
  $Grid->SetCellText($row, $col,"Column : $col");
}
elsif ($col == 0) {
  $Grid->SetCellText($row, $col, "Row : $row");
}
else {
  # $Grid->SetCellType($row, $col, GVIT_NUMERIC);  # Set cell type after 
creation.
  $Grid->SetCellText($row, $col, $row*$col);
}
  }
}

# Set Date edit control in cell (1,1)
$Grid->SetCellText(1, 1, "");
$Grid->SetCellType(1, 1, GVIT_DATE);

# Set Date edit control in cell (1,1)
$Grid->SetCellText(2, 1, "");
$Grid->SetCellType(2, 1, GVIT_DATECAL);

# Set Time edit control in cell (1,2)
$Grid->SetCellText(1, 2, "");
$Grid->SetCellType(1, 2, GVIT_TIME);

# Set Check edit control in cell (1,3)
$Grid->SetCellText(1, 3, "");
$Grid->SetCellType(1, 3, GVIT_CHECK);
$Grid->SetCellCheck(1, 3, 1);
print "Cell Check : ", $Grid->GetCellCheck(1, 3), "\n";

# Set Combobox edit control in cell (1,4)
$Grid->SetCellText(1, 4, "");
$Grid->SetCellType(1, 4, GVIT_COMBO);
$Grid->SetCellOptions(1, 4, ["Option 1", "Option 2", "Option 3"]);

# Set Listbox control in cell (1,5)
$Grid->SetCellText(1, 5, "");
$Grid->SetCellType(1, 5, GVIT_LIST);
$Grid->SetCellOptions(1, 5, ["Option 1", "Option 2", "Option 3"]);

# Set Url control in cell (1,6)
$Grid->SetCellText(1, 6, "www.perl.com");
$Grid->SetCellType(1, 6, GVIT_URL);
$Grid->SetCellOptions(1, 6, -autolaunch => 0);

# Set Url control in cell (2,6)
$Grid->SetCellText(2, 6, "www.perl.com");
$Grid->SetCellType(2, 6, GVIT_URL);
# Set uneditable cell (2,6)
$Grid->SetCellEditable(2, 6, 0);

# Sort Numeric reverse order  (Method 1)
# $Grid->SortNumericCells(5, 0);
# Sort Numeric reverse order (Method 2)
# $Grid->SortCells(5, 0, sub { my ($e1, $e2) = @_; return (int($e1) - int 
($e2)); } );
# Sort Numeric reverse order (Method 3)
# $Grid->SetSortFunction (sub { my ($e1, $e2) = @_; return (int($e1) - int 
($e2)); } );
# $Grid->SortCells(7, 0);
# $Grid->SetSortFunction (); # remove sort method

# Resize Grid Cell
$Grid->AutoSize();

# Event loop
$Window->Show();
Win32::GUI::Dialog();

# Main window event handler
sub Window_Terminate {

  return -1;
}

sub Window_Resize {

  my ($width, $height) = ($Window->GetClientRect)[2..3];
  $Grid->Resize ($width, $height);
}

sub Grid_BeginEdit {
  my ($col, $row) = @_;
  print "Begin Edit ($col, $row)\n";
}

sub Grid_ChangedEdit {
  my ($col, $row, $str) = @_;
  print "Changed Edit ($col, $row, $str)\n";
}

sub Grid_EndEdit {
  my ($col, $row) = @_;
  print "End Edit ($col, $row)\n";
}

--- NEW FILE: two.bmp ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: test3.pl ---
#! perl -w
# 
# Test Grid method
#   - Default cell setting
#   - font method
#
use strict;
use Win32::GUI;
use Win32::GUI::Grid;

# main Window
my $Window = new Win32::GUI::Window (
-title=> "Win32::GUI::Grid test 3",
-pos => [100, 100],
-size=> [400, 400],
-name => "Window",
) or die "new Window";

# Grid Window
my $Grid = $Window->AddGrid (
-name=> "Grid",
-pos => [0, 0],
) or die "new Grid";

# Image list
my $IL = new Win32::GUI::ImageList(16, 16, 24, 3, 10);
$IL->Add("one.bmp");
$IL->Add("two.bmp");
$IL->Add("three.bmp");

# Attach ImageList to grid
$Grid->SetImageList($IL);

# Set default cell style
$Grid->SetDefCellTextColor(0,0, '#FF');
$Grid->SetDefCellTextColor(1,0, '#00FF00');
$Grid->SetDefCellTextColor(0,1, '#FF');

$Grid->SetDefCellBackColor(0,0, '#FF');
$Grid->SetDefCellBackColor(1,0, '#FF');
$Grid->SetDefCellBackColor(0,1, '#00FF00');

$Grid->SetDefCellFormat(0, 0, 
DT_RIGHT|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS|DT_NOPREFIX);
$Grid->SetDefCellFormat(0, 1, 
DT_RIGHT|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS|DT_NOPREFIX);
$Grid->SetDefCellFormat(1, 0, DT_LEFT|DT_WORDBREAK);

# Change default font
my %font = $Grid->GetDefCellFont(0,0);
$font {-bold} = 1;
$font {-height} = 10;
$Grid->SetDefCellFont(0,0, %font);

# Create Cells after set default style. (required

[Perl-win32-gui-cvscommit] Win32-GUI-Grid Changes,NONE,1.1 Grid.pm,NONE,1.1 Grid.xs,NONE,1.1 MANIFEST,NONE,1.1 Makefile.PL,NONE,1.1 README,NONE,1.1 TYPEMAP,NONE,1.1

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Grid
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15861

Added Files:
Changes Grid.pm Grid.xs MANIFEST Makefile.PL README TYPEMAP 
Log Message:
Added to repository

--- NEW FILE: Makefile.PL ---
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

WriteMakefile(
'NAME' => 'Win32::GUI::Grid',
'VERSION_FROM' => 'Grid.pm',
'XS'   => { 'Grid.xs' => 'Grid.cpp' },
'LIBS' => ['Comctl32.lib Mfc42.lib Eafxis.lib'],   # e.g., '-lm'
'DEFINE'   => '', # e.g., '-DHAVE_SOMETHING'
'INC'  => '', # e.g., '-I/usr/include/other'
'MYEXTLIB' => './MFCGrid/Lib/MFCGrid.lib',
 ($] ge '5.005')
 ? (
  'AUTHOR'   => 'ROCHER Laurent ([EMAIL PROTECTED])',
  'ABSTRACT' => 'Add a Grid control to Win32::GUI (MFC Grid from 
CodeProject.com)',
 )
 : (),
);


sub MY::xs_c {
'

.xs.c:
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) 
$(XSUBPPARGS) $*.xs > $*.c

.xs.cpp:
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) 
$(XSUBPPARGS) $*.xs > $*.cpp

./MFCGrid/Lib/MFCGrid.lib: MFCGrid/makefile
cd MFCGrid
nmake
cd ..

';
}


--- NEW FILE: MANIFEST ---
Makefile.PL
Changes
Grid.pm
Grid.xs
MANIFEST
TYPEMAP
MFCGrid/Makefile
--- NEW FILE: Grid.xs ---
/**/
/*  G R I D . x s */
/**/

//
// Include
//

//
// MFC
//

#define _AFX_NOFORCE_LIBS // not force library
#define _WINDLL // Windows DLL
#define _USRDLL //
#define _AFXDLL // Use shared MFC
#define VC_EXTRALEAN// Exclude rarely-used stuff from Windows headers

#include  // MFC core and standard components
[...3241 lines suppressed...]
  object->m_SvSub = NULL;
  object->SetCompareFunction(NULL);
}
else if (nCol < object->GetColumnCount()) {
  pFun = (SV*) object->m_RowSortFunc.GetAt (nCol);
  if (pFun != NULL) {
SvREFCNT_dec (pFun);
object->m_RowSortFunc.SetAtGrow(nCol, NULL);
  }
}
  }

  # // in-built sort functions
  # static int CALLBACK pfnCellTextCompare(LPARAM lParam1, LPARAM lParam2, 
LPARAM lParamSort);
  # static int CALLBACK pfnCellNumericCompare(LPARAM lParam1, LPARAM lParam2, 
LPARAM lParamSort);

  #
  #
  ##


--- NEW FILE: Grid.pm ---
package Win32::GUI::Grid;

use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp 'croak','carp';
use Win32::GUI;

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader Win32::GUI::Window);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

@EXPORT = qw (
  GVL_NONE
  GVL_HORZ
[...1199 lines suppressed...]
=item C<_GetData> (nRow, nCol)

  [virtual Mode Only]
  Must return data cell.

=item C<_CacheHint> (nMinRow, nMinCol, nMaxRow, nMaxCol)

  [virtual Mode Only]
  Range before request data.

=head1 AUTHOR

  Laurent Rocher ([EMAIL PROTECTED])
  HomePage : http://perso.club-internet.fr/rocherl/Win32GUI.html

=head1 SEE ALSO

Win32::GUI

=cut

--- NEW FILE: README ---
Win32::GUI::Grid version 0.07
=

Win32::GUI::Grid add a grid control to Win32::GUI.

This module use MFC Grid control By Chris Maunder.
Url : http://www.codeproject.com/miscctrl/gridctrl.asp
(Modified sources code include)

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make install

DEPENDENCIES

This module requires these other modules and libraries:

   Win32::GUI
   Microsoft Foudation Classes (MFC)

WEB PAGE AND PPM REPOSITORY

See: http://perso.club-internet.fr/rocherl/Win32GUI.html

COPYRIGHT AND LICENCE

Copyright 2003 by Laurent Rocher ([EMAIL PROTECTED]).

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

See .

--- NEW FILE: Changes ---

Revision history for Perl extension Win32::GUI::Grid.

0.07  14/02/2004
- Use MFC Grid control 2.25
- Correct EnsureCellVisible methods ( bad name in XS, but keep 
EnsureVisible for compatibility)
- Fix locale setting problem.

0.06  14/02/2004
- Fix Clipboard error (Ctrl+C) [Thank to Andrew St. Denis]
- Fix some Grid draw problem
- Add WM_PRINTCLIENT support for new Win32::GUI -noflicker option.
- New Cell Type (Calendar, URL)
- SetCellOptions : 

[Perl-win32-gui-cvscommit] Win32-GUI-Grid/MFCGrid CellRange.h,NONE,1.1 GridCell.cpp,NONE,1.1 GridCell.h,NONE,1.1 GridCellBase.cpp,NONE,1.1 GridCellBase.h,NONE,1.1 GridCellCheck.cpp,NONE,1.1 GridCellCh

2005-11-01 Thread jw
Update of /cvsroot/perl-win32-gui/Win32-GUI-Grid/MFCGrid
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15861/MFCGrid

Added Files:
CellRange.h GridCell.cpp GridCell.h GridCellBase.cpp 
GridCellBase.h GridCellCheck.cpp GridCellCheck.h 
GridCellCombo.cpp GridCellCombo.h GridCellDateTime.cpp 
GridCellDateTime.h GridCellNumeric.cpp GridCellNumeric.h 
GridCellURL.cpp GridCellURL.h GridCtrl.cpp GridCtrl.h 
GridDropTarget.cpp GridDropTarget.h InPlaceEdit.cpp 
InPlaceEdit.h Makefile MemDC.h StdAfx.cpp StdAfx.h 
TitleTip.cpp TitleTip.h 
Log Message:
Added to repository

--- NEW FILE: InPlaceEdit.h ---
//
// InPlaceEdit.h : header file
//
// MFC Grid Control - inplace editing class
//
// Written by Chris Maunder <[EMAIL PROTECTED]>
// Copyright (c) 1998-2002. All Rights Reserved.
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is 
// not sold for profit without the authors written consent, and 
// providing that this notice and the authors name and all copyright 
// notices remains intact. 
//
// An email letting me know how you are using it would be nice as well. 
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.
//
// For use with CGridCtrl v2.10+
//
//

#if !defined(AFX_INPLACEEDIT_H__ECD42821_16DF_11D1_992F_895E185F9C72__INCLUDED_)
#define AFX_INPLACEEDIT_H__ECD42821_16DF_11D1_992F_895E185F9C72__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CInPlaceEdit : public CEdit
{
// Construction
public:
CInPlaceEdit(CWnd* pParent, CRect& rect, DWORD dwStyle, UINT nID,
 int nRow, int nColumn, CString sInitText, UINT nFirstChar);

// Attributes
public:
 
// Operations
public:
 void EndEdit();
 
// Overrides
 // ClassWizard generated virtual function overrides
 //{{AFX_VIRTUAL(CInPlaceEdit)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
 
// Implementation
public:
 virtual ~CInPlaceEdit();
 
// Generated message map functions
protected:
//{{AFX_MSG(CInPlaceEdit)
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg UINT OnGetDlgCode();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()

private:
int m_nRow;
int m_nColumn;
CString m_sInitText;
UINTm_nLastChar;
BOOLm_bExitOnArrows;
CRect   m_Rect;
};
 
/

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately 
before the previous line.

#endif // 
!defined(AFX_INPLACEEDIT_H__ECD42821_16DF_11D1_992F_895E185F9C72__INCLUDED_)

--- NEW FILE: GridCellCheck.cpp ---
// GridCellCheck.cpp : implementation file
//
// MFC Grid Control - Main grid cell class
//
// Provides the implementation for a combobox cell type of the
// grid control.
//
// Written by Chris Maunder <[EMAIL PROTECTED]>
// Copyright (c) 1998-2002. All Rights Reserved.
//
// Parts of the code contained in this file are based on the original
// CInPlaceList from http://www.codeguru.com/listview
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is
// not sold for profit without the authors written consent, and
// providing that this notice and the authors name and all copyright
// notices remains intact.
//
// An email letting me know how you are using it would be nice as well.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.
//
// For use with CGridCtrl v2.22+
//
// History:
// 23 Jul 2001 - Complete rewrite
//
/

#include "StdAfx.h"
#include "GridCell.h"
#include "GridCtrl.h"

#include "GridCellCheck.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

IMPLEMENT_DYNCREATE(CGridCellCheck, CGridCell)

CGridCellCheck::CGridCellCheck() : CGridCell()
{
m_bChecked = FALSE;
//m_Rect.IsRectNull();
}

CSize CGridCellCheck::GetCellExtent(CDC* pDC)
{
// Using SM_CXHSCROLL as a guide to the size of the checkbox
int nWidth = GetSystemMetrics(SM_CXHSCROLL) + 2*GetMargin();  // Yogurt 
$$LR$$
CSize   cellSize = CGridCell::GetCellExtent(pDC);
cellSize.cx += nWidth;
cellSize.cy = max (cellSize