Win32-GUI

 view release on metacpan or  search on metacpan

Combobox.xs  view on Meta::CPAN

    RETVAL

    ###########################################################################
    # (@)METHOD:SetEditSel(START,END)
    # Select characters in the textfield.  START and END are the
    # (zero-based) index of the characters to be selected.  START
    # is the index of the first character to be selected, and END
    # is the index of the first character following the selection.
    # For example to select the first 4 characters:
    # 
    #    $combobox->SetEditSel(0,4);
    #
    # If START is -1, the any selection is removed.  If END is -1,
    # then the selection is from START to the last character in the
    # textfield.
    #
    # Returns 1 on success, 0 on failure and -1 if sent to a
    # Combobox that does not have a textfield (C<-dropdownlist => 1>).
LRESULT
SetEditSel(handle,start,end)
    HWND handle

GENERATED/Win32/GUI/Combobox.pod  view on Meta::CPAN


=head1 NAME

Win32::GUI::Combobox - Create and manipulate combobox controls

=head1 DESCRIPTION

[TBD]

=for comment $Id: per_package_method_section.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head1 METHODS

L<Common methods|Win32::GUI::Reference::Methods> apply to most windows, controls and resources.

GENERATED/Win32/GUI/Combobox.pod  view on Meta::CPAN

=head2 SetEditSel

B<SetEditSel(START,END)>

Select characters in the textfield.  START and END are the
(zero-based) index of the characters to be selected.  START
is the index of the first character to be selected, and END
is the index of the first character following the selection.
For example to select the first 4 characters:

   $combobox->SetEditSel(0,4);

If START is -1, the any selection is removed.  If END is -1,
then the selection is from START to the last character in the
textfield.

Returns 1 on success, 0 on failure and -1 if sent to a
Combobox that does not have a textfield (C<-dropdownlist => 1>).

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

GENERATED/Win32/GUI/ComboboxEx.pod  view on Meta::CPAN


=head1 NAME

Win32::GUI::ComboboxEx - Create and manipulate extended combobox controls

=head1 DESCRIPTION

[TBD]

=for comment $Id: per_package_method_section.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head1 METHODS

L<Common methods|Win32::GUI::Reference::Methods> apply to most windows, controls and resources.

GUI.pm  view on Meta::CPAN

    ###########################################################################
    # (@)METHOD:Select()
    # Select Item.
sub Select {
    my($self) = @_;
    $self->{-parent}->Select($self->{-index});
}

###############################################################################
# (@)PACKAGE:Win32::GUI::Combobox
# Create and manipulate combobox controls
#
package Win32::GUI::Combobox;
@ISA = qw(
    Win32::GUI
    Win32::GUI::WindowProps
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::Combobox(PARENT, %OPTIONS)
    # Creates a new Combobox object;

GUI.pm  view on Meta::CPAN

    if($new) {
        $new->{-tracking} = 0;
        return $new;
    } else {
        return undef;
    }
}

###############################################################################
# (@)PACKAGE:Win32::GUI::ComboboxEx
# Create and manipulate extended combobox controls
#
package Win32::GUI::ComboboxEx;
@ISA = qw(
    Win32::GUI::Combobox
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::ComboboxEx(PARENT, %OPTIONS)
    # Creates a new ComboboxEx object;
    # can also be called as PARENT->AddComboboxEx(%OPTIONS).

Win32-GUI_Constants/Tags.pm  view on Meta::CPAN


All defined constants.  Note that this is a very large list.

=back

=head2 Package Specific Export Tags

The following list of export tags is defined, each exporting constant that may be
useful with the related Win32::GUI package(s).  Note that some currently export nothing.

:accelerator, :animation, :bitmap, :brush, :button, :class, :combobox, :cursor,
:datetime, :dc, :font, :header, :icon, :imagelist, :label, :listbox, :listview, :mdi,
:menu, :monthcal, :notifyicon, :pen, :progressbar, :rebar, :region, :richedit,
:scrollbar, :slider, :splitter, :statusbar, :tabstrip, :textfield, :timer, :toolbar,
:tooltip, :treeview, :updown, :window

=cut

# tag spec's
# keys are tags, values are array ref containg regex patterns of
# constants to match.  If value is undef, then the definition will

Win32-GUI_Constants/Tags.pm  view on Meta::CPAN

    all         => [ qw( .* ) ],

    compatibility_win32_gui => undef,

    accelerator => [ qw( ^VK_ ) ],
    animation   => [ qw( ^ACS_ ^ACM_ ^ACN_ ) ],
    bitmap      => [ qw( ^OBM_ ) ],
    brush       => [ qw() ],
    button      => undef,
    class       => [ qw( ^COLOR_ ^CS_ ) ],
    combobox    => [ qw( ^CB_ ^CBS_ ^CBES_ ^CBN_ ) ],
    cursor      => [ qw( ^IDC_ ^OCR_ ) ],
    datetime    => [ qw( ^DTS_ ) ],
    dc          => undef,
    font        => [ qw() ],
    header      => [ qw( ^HDS_ ) ],
    icon        => [ qw( ^IDI_ ^OIC_ ) ],
    imagelist   => [ qw( ^ILC_ ^ILD_ ^ILS_ ^CLR_NONE$ ^CLR_DEFAULT$ ^IMAGE_ ) ],
    label       => [ qw( ^IMAGE_ ^STM_ ^STN_ ) ],
    listbox     => [ qw( ^LB_ ^LBN_ ^LBS_ ) ],
    listview    => [ qw( ^LVS_ ^LVIS_ ^LVIR_ ^LVSIL_ ^CLR_NONE$ ) ],

Win32-GUI_Constants/t/52_tags.t  view on Meta::CPAN


BEGIN { $| = 1 } # Autoflush

# Check that the rest of the tags don't change from release to release
# without us knowing. IF YOU HAVE CHANGED THE TAG DEFINITIONS, THEN UPDATE
# THIS TEST FILE TO REFLECT THE CHANGES.

use Test::More;

my @tags = qw( common customdraw stockobjects accelerator animation bitmap brush
button class combobox cursor datetime dc font header icon imagelist label listbox listview
mdi menu monthcal notifyicon pen progressbar rebar region richedit scrollbar slider
splitter statusbar tabstrip textfield timer toolbar tooltip treeview updown window );

plan tests => (2 * @tags);

my %RESULTS = (
  common => [ qw( CW_USEDEFAULT ) ],
  customdraw => [
qw( CDDS_ITEM CDDS_ITEMPOSTERASE CDDS_PREERASE CDDS_POSTERASE CDDS_ITEMPOSTPAINT
    CDDS_ITEMPREERASE CDDS_SUBITEM CDDS_ITEMPREPAINT CDDS_POSTPAINT CDDS_PREPAINT

Win32-GUI_Constants/t/52_tags.t  view on Meta::CPAN

    COLOR_BTNSHADOW COLOR_GRAYTEXT COLOR_INACTIVEBORDER COLOR_BTNHIGHLIGHT COLOR_INFOTEXT
    COLOR_BTNTEXT COLOR_SCROLLBAR COLOR_MENUHILIGHT COLOR_CAPTIONTEXT COLOR_3DSHADOW
    COLOR_HOTLIGHT COLOR_MENUBAR COLOR_INACTIVECAPTIONTEXT COLOR_HIGHLIGHTTEXT
    COLOR_BTNHILIGHT COLOR_HIGHLIGHT COLOR_GRADIENTINACTIVECAPTION COLOR_MENU
    COLOR_BTNFACE COLOR_ACTIVECAPTION COLOR_3DDKSHADOW COLOR_ACTIVEBORDER
    COLOR_WINDOWFRAME COLOR_INACTIVECAPTION COLOR_INFOBK COLOR_APPWORKSPACE
    COLOR_GRADIENTACTIVECAPTION COLOR_DESKTOP COLOR_3DFACE COLOR_3DHILIGHT COLOR_3DLIGHT
    CS_DROPSHADOW CS_PARENTDC CS_NOCLOSE CS_VREDRAW CS_BYTEALIGNCLIENT CS_OWNDC
    CS_CLASSDC CS_BYTEALIGNWINDOW CS_DBLCLKS CS_IME CS_HREDRAW CS_SAVEBITS
    CS_GLOBALCLASS ) ],
  combobox => [
qw( CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE
    CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT
    CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE CBES_EX_NOEDITIMAGE
    CBES_EX_NOEDITIMAGEINDENT CBES_EX_PATHWORDBREAKPROC CBES_EX_NOSIZELIMIT
    CBES_EX_CASESENSITIVE
    CB_OKAY CB_ERR CB_ERRSPACE
    CB_GETEDITSEL CB_LIMITTEXT CB_SETEDITSEL CB_ADDSTRING CB_DELETESTRING CB_DIR
    CB_GETCOUNT CB_GETCURSEL CB_GETLBTEXT CB_GETLBTEXTLEN CB_INSERTSTRING CB_RESETCONTENT
    CB_FINDSTRING CB_SELECTSTRING CB_SETCURSEL CB_SHOWDROPDOWN CB_GETITEMDATA CB_SETITEMDATA
    CB_GETDROPPEDCONTROLRECT CB_SETITEMHEIGHT CB_GETITEMHEIGHT CB_SETEXTENDEDUI

Win32-GUI_Grid/MFCGrid/GridCellCheck.cpp  view on Meta::CPAN

// 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 <cmaunder@mail.com>
// 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

Win32-GUI_Grid/MFCGrid/GridCellCombo.cpp  view on Meta::CPAN

// GridCellCombo.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 <cmaunder@mail.com>
// Copyright (c) 1998-2001. 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 

Win32-GUI_Grid/MFCGrid/GridCellCombo.cpp  view on Meta::CPAN

    m_crForeClr = crFore;
    m_crBackClr = crBack;

	m_nNumLines = 4;
	m_sInitText = sInitText;
 	m_nRow		= nRow;
 	m_nCol      = nColumn;
 	m_nLastChar = 0; 
	m_bExitOnArrows = FALSE; //(nFirstChar != VK_LBUTTON);	// If mouse click brought us here,

	// Create the combobox
 	DWORD dwComboStyle = WS_BORDER|WS_CHILD|WS_VISIBLE|WS_VSCROLL|
 					     CBS_AUTOHSCROLL | dwStyle;
	int nHeight = rect.Height();
	rect.bottom = rect.bottom + m_nNumLines*nHeight + ::GetSystemMetrics(SM_CYHSCROLL);
	if (!Create(dwComboStyle, rect, pParent, nID)) return;

	// Add the strings
	for (int i = 0; i < Items.GetSize(); i++) 
		AddString(Items[i]);

Win32-GUI_Grid/MFCGrid/GridCellCombo.cpp  view on Meta::CPAN

	SetDroppedWidth(nMaxLength);

	SetHorizontalExtent(0); // no horz scrolling

	// Set the initial text to m_sInitText
    if (::IsWindow(m_hWnd) && SelectString(-1, m_sInitText) == CB_ERR) 
		SetWindowText(m_sInitText);		// No text selected, so restore what was there before

    ShowDropDown();

    // Subclass the combobox edit control if style includes CBS_DROPDOWN
    if ((dwStyle & CBS_DROPDOWNLIST) != CBS_DROPDOWNLIST)
    {
        m_edit.SubclassDlgItem(IDC_COMBOEDIT, this);
 	    SetFocus();
        switch (nFirstChar)
        {
            case VK_LBUTTON: 
            case VK_RETURN:   m_edit.SetSel((int)_tcslen(m_sInitText), -1); return;
            case VK_BACK:     m_edit.SetSel((int)_tcslen(m_sInitText), -1); break;
            case VK_DOWN: 

Win32-GUI_Grid/MFCGrid/GridCellCombo.h  view on Meta::CPAN

// CInPlaceList window

class CInPlaceList : public CComboBox
{
    friend class CComboEdit;

// Construction
public:
	CInPlaceList(CWnd* pParent,         // parent
                 CRect& rect,           // dimensions & location
                 DWORD dwStyle,         // window/combobox style
                 UINT nID,              // control ID
                 int nRow, int nColumn, // row and column
                 COLORREF crFore, COLORREF crBack,  // Foreground, background colour
				 CStringArray& Items,   // Items in list
                 CString sInitText,     // initial selection
				 UINT nFirstChar);      // first character to pass to control

// Attributes
public:
   CComboEdit m_edit;  // subclassed edit control

Win32-GUI_Grid/MFCGrid/GridCellDateTime.h  view on Meta::CPAN

        CTime* GetTime() {return &m_cTime;};
        void   SetTime(CTime time);
};

class CInPlaceDateTime : public CDateTimeCtrl
{
    // Construction
public:
    CInPlaceDateTime(CWnd* pParent,         // parent
        CRect& rect,           // dimensions & location
        DWORD dwStyle,         // window/combobox style
        UINT nID,              // control ID
        int nRow, int nColumn, // row and column
        COLORREF crFore, COLORREF crBack,  // Foreground, background colour
        CTime* pcTime,
        UINT nFirstChar);      // first character to pass to control
    
    // Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CInPlaceList)
protected:



( run in 2.269 seconds using v1.01-cache-2.11-cpan-2398b32b56e )