English
XProfEd - Opensource IDE

0.98b -> XPrfEditFindReplaceClass

 
sure ausbaufähig - but me personally disturbing it very if I whom whole editor not any more using can only because the SuchenFenster on is, or. if I only in a only instance search can.

now can z.B. Strg+F pressing, TEST prompt & [enter] pressing, again STRG+F pressing, BLUP prompt, etc. etc..

herewith is the trouble of table - Perhaps one beginning...
CompileMarkSeparation
!
======================
IFFindReplace-Klasse
======================
XPrfEditFindReplaceClass.prf
DEF &XFRepl.MaxInstancesCount 5
Class XFRepl = 	+XFRepl@,
+exit@,
-hide@,
-show@,
-checkActivity@,
+dlg&,
-bClose&,
-bWeit&,
+cCase&,
+cWord&,
-cVor&,
+cZur&,
+eSuch&,
-eFlag&,
-Id&,
-instance&,
+isVisible&
Declare		XFRepl.Dlg.Width&,
XFRepl.Dlg.Height&,
XFRepl.h#[&XFRepl.MaxInstancesCount]

Proc XFRepl.XFRepl

    parameters instance&
    XFRepl.Dlg.Width&=364
    XFRepl.Dlg.Height&=110+%cycaption
    .instance&=instance&
    .DLG& = CREATE("DIALOG",%HWND,"Suchen nach",%maxx,%maxy,640,480)
    showwindow(.DLG&,0)
    CREATE("TEXT",.DLG&,"&Suchen nach:",15,12,70,20)
    .eSuch& = CREATE("EDIT",     .DLG&,"", 88, 12, 170, 20)
    .bWeit& = CREATE("DEFBUTTON",   .DLG&, "&Weitersuchen",  268, 11, 80, 22)
    .cCase& = CREATE("CHECKBOX", .DLG&,"&Groß-/Kleinschreibung",  15, 50, 150, 20)
    .cWord& = CREATE("CHECKBOX", .DLG&,"&Nur ganzes Wort suchen", 15, 75, 150, 20)
    CREATE("GROUPBOX", .DLG&, "Such&richtung", 170, 40, 90, 60)
    .cZur&  = CREATE("RADIOBUTTON", .DLG&, "nach &oben",  175, 55, 80, 20)
    .cVor&  = CREATE("RADIOBUTTON", .DLG&, "nach &unten", 175, 75, 80, 20)
    .bEsc&  = CREATE("BUTTON",   .DLG&, "&Abbruch",       268, 38, 80, 22)
    .bClose&= CREATE("BUTTON",.DLG&, "&Schliessen",            268, 78, 80, 22)
    .show()

endproc

proc XFRepl.Show

    declare y&
    y&=(%wintop+(XFRepl.Dlg.Height&+20)*.instance&)
    case (y&>%winbottom-100) : y&=%winbottom-100
    setwindowpos .dlg&=(%winright-50-XFRepl.Dlg.Width&),y& - XFRepl.Dlg.Width&,XFRepl.Dlg.Height&
    SetCheck .cVor&, 1
    SetCheck .cCase&,0
    SetCheck .cWord&,0
    SetText .eSuch&,""
    showwindow(.dlg&,1)
    setfocus(.eSuch&)
    SendMessage(.eSuch&,~em_SetSel,0,-1)
    .isVisible&=1

endproc

proc XFRepl.Hide

    showwindow(.dlg&,0)
    setactivewindow(%hwnd)
    .isVisible&=0

endproc

proc XFRepl.checkActivities

    whileloop &XFRepl.MaxInstancesCount

        if Typeof(XFRepl.h#[&loop])="o"

            if (XFRepl.h#[&loop].isVisible&)

                select XFRepl.h#[&loop].checkActivity()

                    caseof 1

                    If Edit#[AktTab%].Search(gettext$(XFRepl.h#[&loop].eSuch&),getcheck(XFRepl.h#[&loop].cWord&), getcheck(XFRepl.h#[&loop].cCase&), GetCheck(XFRepl.h#[&loop].cZur&)) = -1

                        Messagebox("q" + gettext$(XFRepl.h#[&loop].eSuch&) + "q nicht gefunden!","Information",64)
                        setactivewindow(XFRepl.h#[&loop].dlg&)
                        setfocus(XFRepl.h#[&loop].eSuch&)
                        SendMessage(XFRepl.h#[&loop].eSuch&,~em_SetSel,0,-1)

                    endif

                    otherwise

                endselect

            endif

        endif

    wend

endproc

proc XFRepl.checkActivity

    casenot getactivewindow()=.dlg& : return

    if %key=2

        .hide()
        setmenuitem 0

        whileloop &XFRepl.MaxInstancesCount,1,-1

            if Typeof(XFRepl.h#[&loop])="o"

                if (XFRepl.h#[&loop].isVisible&)

                    setactivewindow(XFRepl.h#[&loop].dlg&)
                    setfocus(XFRepl.h#[&loop].eSuch&)
                    SendMessage(XFRepl.h#[&loop].eSuch&,~em_SetSel,0,-1)
                    break

                endif

            endif

        wend

        return 0

    elseif Clicked(.bClose&) or Clicked(.bWeit&) or (%KEY = 13)

        if Clicked(.bClose&)

            .hide()
            setmenuitem 0

            whileloop &XFRepl.MaxInstancesCount,1,-1

                if Typeof(XFRepl.h#[&loop])="o"

                    if (XFRepl.h#[&loop].isVisible&)

                        setactivewindow(XFRepl.h#[&loop].dlg&)
                        setfocus(XFRepl.h#[&loop].eSuch&)
                        SendMessage(XFRepl.h#[&loop].eSuch&,~em_SetSel,0,-1)
                        break

                    endif

                endif

            wend

            return 0

        endif

        if %key=13

            setfocus(.eSuch&)
            SendMessage(.eSuch&,~em_SetSel,0,-1)

        endif

        .eflag&=0

        if GetText$(.eSuch&)>""

            return 1

        endif

    endif

endproc

Proc XFRepl.exit

    destroywindow(.bClose&)
    destroywindow(.bEsc&)
    destroywindow(.bWeit&)
    destroywindow(.cCase&)
    destroywindow(.cWord&)
    destroywindow(.cVor&)
    destroywindow(.cZur&)
    destroywindow(.eSuch&)
    destroywindow(.dlg&)

endproc


in the Hauptprogramm must then following Changes:

The:
CompileMarkSeparationmust inkludiert go.

The Proc Search must ausgetausch go:
CompileMarkSeparation
!

Proc Search

    whileloop &XFRepl.MaxInstancesCount

        ifnot Typeof(XFRepl.h#[&loop])="o"

            XFRepl.h#[&loop]=new(XFRepl,&loop)
            break

        else

            ifnot (XFRepl.h#[&loop].isVisible&)

                XFRepl.h#[&loop].show()
                break

            endif

        endif

    wend

ENDPROC


and in it Hauptschleife the Progammes must over:
CompileMarkSeparation
TesteMenue(AktTab%)
these row eingefügt go:
CompileMarkSeparation
in the Hauptprogramm must still:
CompileMarkSeparation
elseif @menuitem(401)

Search(Such#)
TabAktiv AktTab%
in
CompileMarkSeparationsupplant go.

Perhaps building Roland Yes something like or what Ähnliches one.

particularly the the editor not blockiert is find I very useful!
 
09/26/06  
 



means testing quiet time STRG+F often nacheinander...

11 kB
Hochgeladen:09/26/06
Downloadcounter49
Download
 
09/26/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.028 Views

Untitledvor 0 min.
RudiB.04/14/20
rquindt03/31/18

Themeninformationen

this Topic has 1 subscriber:

iF (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie