Win32-GUI

 view release on metacpan or  search on metacpan

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

B<BackColor([COLOR])>

See L<SetBkgndColor()|Win32::GUI::RichEdit/SetBkgndColor>

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

=head2 CanPaste

B<CanPaste([FORMAT=CF_TEXT])>

Determine if RichEdit can paste a specified clipboard format.

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

=head2 CanRedo

B<CanRedo()>

Determine whether there are any actions in redo queue

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

RichEdit.xs  view on Meta::CPAN

AutoURLDetect(handle, flag=TRUE)
    HWND   handle
    BOOL   flag
CODE:
    RETVAL = SendMessage(handle, EM_AUTOURLDETECT, (WPARAM) flag, 0);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:CanPaste([FORMAT=CF_TEXT])
    # Determine if RichEdit can paste a specified clipboard format.

LRESULT
CanPaste(handle, value=CF_TEXT)
    HWND   handle
    WPARAM value
CODE:
    RETVAL = SendMessage(handle, EM_CANPASTE, value, 0);
OUTPUT:
    RETVAL

Win32-GUI_AxWindow/demos/UnComplete/MsFlexGrid.pm  view on Meta::CPAN

##      [id(0x0000004c), propget, bindable, helpstring("Returns/sets the data source for the control."), helpcontext(0x000591d9)]
##      IRowCursor* DataSource();
##      [id(0x0000004c), propput, bindable, helpstring("Returns/sets the data source for the control."), helpcontext(0x000591d9)]
##      void DataSource([in] IRowCursor* rhs);
##
##      [id(0x0000002a), propget, helpstring("Returns/sets an image to be displayed in the current cell or in a range of cells."), helpcontext(0x000591e9)]
##      IPictureDisp* CellPicture();
##      [id(0x0000002a), propputref, helpstring("Returns/sets an image to be displayed in the current cell or in a range of cells."), helpcontext(0x000591e9)]
##      void CellPicture([in] IPictureDisp* rhs);
##
##      [id(0x00000031), propget, helpstring("Returns a picture of the FlexGrid control, suitable for printing, saving to disk, copying to the clipboard, or assigning to a different control."), helpcontext(0x00059207)]
##      IPictureDisp* Picture();
##
##      [id(0x00000036), propget, helpstring("Returns/sets a custom mouse icon."), helpcontext(0x000591cd)]
##      IPictureDisp* MouseIcon();
##      [id(0x00000036), propputref, helpstring("Returns/sets a custom mouse icon."), helpcontext(0x000591cd)]
##      void MouseIcon([in] IPictureDisp* rhs);
##
##      [id(0xfffffe00), propget, bindable, requestedit, helpstring("Returns/sets the default font or the font for individual cells."), helpcontext(0x000591c8)]
##      IFontDisp* Font();
##      [id(0xfffffe00), propputref, bindable, requestedit, helpstring("Returns/sets the default font or the font for individual cells."), helpcontext(0x000591c8)]

Win32-GUI_Grid/Grid.pm  view on Meta::CPAN

TBD

=back

=head3 Clipboard

=over

=item C<OnEditCut> ()

Copies contents of selected cells to clipboard and deletes the
contents of the selected cells. (Ctrl-X)

=item C<OnEditCopy> ()

Copies contents of selected cells to clipboard. (Ctrl-C)

=item C<OnEditPaste> ()

Pastes the contents of the clipboard to the grid. (Ctrl-V)

=item C<OnEditSelectAll> ()

Not actually a clipboard function, but handy nevertheless.
This routine selects all cells in the grid. (Ctrl-A)

=back

=head2 Grid Event

=over

=item C<_Click> (nRow, nCol)

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

//
// ISSUES: 2) WindowFromPoint seems to do weird things in W2K. Causing problems for
//            the rigt-click-on-titletip code.
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "MemDC.h"
#include "GridCtrl.h"

// OLE stuff for clipboard operations
#include <afxadv.h>            // For CSharedFile
#include <afxconv.h>           // For LPTSTR -> LPSTR macros

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

// Spit out some messages as a sanity check for programmers
#ifdef GRIDCONTROL_NO_TITLETIPS
#pragma message(" -- CGridCtrl: No titletips for cells with large data")
#endif
#ifdef GRIDCONTROL_NO_DRAGDROP
#pragma message(" -- CGridCtrl: No OLE drag and drop")
#endif
#ifdef GRIDCONTROL_NO_CLIPBOARD
#pragma message(" -- CGridCtrl: No clipboard support")
#endif
#ifdef GRIDCONTROL_NO_PRINTING
#pragma message(" -- CGridCtrl: No printing support")
#endif


IMPLEMENT_DYNCREATE(CGridCtrl, CWnd)


// Get the number of lines to scroll with each mouse wheel notch

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


    for (POSITION pos = m_SelectedCellMap.GetStartPosition(); pos != NULL; )
    {
                DWORD key;
        CCellID cell;
        m_SelectedCellMap.GetNextAssoc(pos, key, (CCellID&)cell);
        ValidateAndModifyCellContents(cell.row, cell.col, _T(""));
    }
}

// Copies text from the selected cells to the clipboard
COleDataSource* CGridCtrl::CopyTextFromGrid()
{
    USES_CONVERSION;

    CCellRange Selection = GetSelectedCellRange();
    if (!IsValid(Selection))
        return NULL;

    if (GetVirtualMode())
        SendCacheHintToParent(Selection);

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

    if (!hMem)
        return NULL;

    // Cache data
    COleDataSource* pSource = new COleDataSource();
    pSource->CacheGlobalData(CF_TEXT, hMem);

    return pSource;
}

// Pastes text from the clipboard to the selected cells
BOOL CGridCtrl::PasteTextToGrid(CCellID cell, COleDataObject* pDataObject,
                                                                BOOL bSelectPastedCells /*=TRUE*/)
{
    if (!IsValid(cell) || !IsCellEditable(cell) || !pDataObject->IsDataAvailable(CF_TEXT))
        return FALSE;

    // Get the text from the COleDataObject
    HGLOBAL hmem = pDataObject->GetGlobalData(CF_TEXT);
    CMemFile sf((BYTE*) ::GlobalLock(hmem), ::GlobalSize(hmem));

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


        m_MouseMode = MOUSE_DRAGGING;
        m_bLMouseButtonDown = FALSE;

        DROPEFFECT dropEffect = pSource->DoDragDrop(DROPEFFECT_COPY | DROPEFFECT_MOVE);

        if (dropEffect & DROPEFFECT_MOVE)
            CutSelectedText();

        if (pSource)
            delete pSource;    // Did not pass source to clipboard, so must delete
    }
}

// Handle drag over grid
DROPEFFECT CGridCtrl::OnDragOver(COleDataObject* pDataObject, DWORD dwKeyState,
                                 CPoint point)
{
    // Any text data available for us?
    if (!m_bAllowDragAndDrop || !IsEditable() || !pDataObject->IsDataAvailable(CF_TEXT))
        return DROPEFFECT_NONE;

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

        if (!pCell) return;

                CWnd* pEditWnd = pCell->GetEditWnd();
                if ( pEditWnd && pEditWnd->IsKindOf(RUNTIME_CLASS(CEdit)) )
                {
                        ((CEdit*)pEditWnd)->Paste();
                        return;
                }
    }

    // Attach a COleDataObject to the clipboard and paste the data to the grid
    COleDataObject obj;
    if (obj.AttachClipboard())
        PasteTextToGrid(cell, &obj);
}
#endif

void CGridCtrl::OnEditSelectAll()
{
    SendMessageToParent(m_LeftClickDownCell.row, m_LeftClickDownCell.col, GVN_SELCHANGING);
    SelectAllCells();

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

#include "GridCell.h"
#include <afxtempl.h>


///////////////////////////////////////////////////////////////////////////////////
// Defines - these determine the features (and the final size) of the final code
///////////////////////////////////////////////////////////////////////////////////

//#define GRIDCONTROL_NO_TITLETIPS   // Do not use titletips for cells with large data
//#define GRIDCONTROL_NO_DRAGDROP    // Do not use OLE drag and drop
//#define GRIDCONTROL_NO_CLIPBOARD   // Do not use clipboard routines

#ifdef _WIN32_WCE
#   define GRIDCONTROL_NO_TITLETIPS   // Do not use titletips for cells with large data
#   define GRIDCONTROL_NO_DRAGDROP    // Do not use OLE drag and drop
#   define GRIDCONTROL_NO_CLIPBOARD   // Do not use clipboard routines
#   define GRIDCONTROL_NO_PRINTING    // Do not use printing routines
#   ifdef WCE_NO_PRINTING                         // Older versions of CE had different #def's
#       define _WIN32_WCE_NO_PRINTING
#   endif
#   ifdef WCE_NO_CURSOR
#       define _WIN32_WCE_NO_CURSOR
#   endif
#endif  // _WIN32_WCE

// Use this as the classname when inserting this control as a custom control

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

///////////////////////////////////////////////////////////////////////////////////
// Conditional includes
///////////////////////////////////////////////////////////////////////////////////

#ifndef GRIDCONTROL_NO_TITLETIPS
#   include "TitleTip.h"
#endif

#ifndef GRIDCONTROL_NO_DRAGDROP
#   include "GridDropTarget.h"
#   undef GRIDCONTROL_NO_CLIPBOARD     // Force clipboard functions on
#endif

#ifndef GRIDCONTROL_NO_CLIPBOARD
#   include <afxole.h>
#endif


///////////////////////////////////////////////////////////////////////////////////
// Helper functions
///////////////////////////////////////////////////////////////////////////////////

Win32-GUI_Scintilla/Include/Scintilla.iface  view on Meta::CPAN


# Are there any undoable actions in the undo history?
fun bool CanUndo=2174(,)

# Delete the undo history.
fun void EmptyUndoBuffer=2175(,)

# Undo one action in the undo history.
fun void Undo=2176(,)

# Cut the selection to the clipboard.
fun void Cut=2177(,)

# Copy the selection to the clipboard.
fun void Copy=2178(,)

# Paste the contents of the clipboard into the document replacing the selection.
fun void Paste=2179(,)

# Clear the selection.
fun void Clear=2180(,)

# Replace the contents of the document with the argument text.
fun void SetText=2181(, string text)

# Retrieve all the text in the document.
# Returns number of characters retrieved.

Win32-GUI_Scintilla/Include/Scintilla.iface  view on Meta::CPAN

fun void ParaUpExtend=2416(,)

# Given a valid document position, return the previous position taking code
# page into account. Returns 0 if passed 0.
fun position PositionBefore=2417(position pos,)

# Given a valid document position, return the next position taking code
# page into account. Maximum value returned is the last position in the document.
fun position PositionAfter=2418(position pos,)

# Copy a range of text to the clipboard. Positions are clipped into the document.
fun void CopyRange=2419(position start, position end)

# Copy argument text to the clipboard.
fun void CopyText=2420(int length, string text)

enu SelectionMode=SC_SEL_
val SC_SEL_STREAM=0
val SC_SEL_RECTANGLE=1
val SC_SEL_LINES=2

# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or
# by lines (SC_SEL_LINES).
set void SetSelectionMode=2422(int mode,)

Win32-GUI_Scintilla/Scintilla.pod  view on Meta::CPAN

=item C<EmptyUndoBuffer>

Delete the undo history.

=item C<Undo>

Undo one action in the undo history.

=item C<Cut>

Cut the selection to the clipboard.

=item C<Copy>

Copy the selection to the clipboard.

=item C<Paste>

Paste the contents of the clipboard into the document replacing the selection.

=item C<Clear>

Clear the selection.

=item C<SetText> (text)

Replace the contents of the document with the argument text.

=item C<GetText>

Win32-GUI_Scintilla/Scintilla.pod  view on Meta::CPAN

Given a valid document position, return the previous position taking code
page into account. Returns 0 if passed 0.

=item C<PositionAfter>(pos)

Given a valid document position, return the next position taking code
page into account. Maximum value returned is the last position in the document.

=item C<CopyRange>(start, end)

Copy a range of text to the clipboard. Positions are clipped into the document.

=item C<CopyText> (length, text)

Copy argument text to the clipboard.

=item C<SetSelectionMode> (mode)

Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or by lines (SC_SEL_LINES).

=item C<GetSelectionMode>

Get the mode of the current selection.

=item C<GetLineSelStartPosition> (line)



( run in 0.752 second using v1.01-cache-2.11-cpan-81fc1098f69 )