$81 GRAYBYTE WORDPRESS FILE MANAGER $25

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python33/lib64/python3.3/idlelib/

HOME
Current File : /opt/alt/python33/lib64/python3.3/idlelib//SearchDialogBase.py
'''Define SearchDialogBase used by Search, Replace, and Grep dialogs.'''
from tkinter import *

class SearchDialogBase:
    '''Create most of a modal search dialog (make_frame, create_widgets).

    The wide left column contains:
    1 or 2 text entry lines (create_entries, make_entry);
    a row of standard radiobuttons (create_option_buttons);
    a row of dialog specific radiobuttons (create_other_buttons).

    The narrow right column contains command buttons
    (create_command_buttons, make_button).
    These are bound to functions that execute the command.

    Except for command buttons, this base class is not limited to
    items common to all three subclasses.  Rather, it is the Find dialog
    minus the "Find Next" command and its execution function.
    The other dialogs override methods to replace and add widgets.
    '''

    title = "Search Dialog"
    icon = "Search"
    needwrapbutton = 1

    def __init__(self, root, engine):
        self.root = root
        self.engine = engine
        self.top = None

    def open(self, text, searchphrase=None):
        self.text = text
        if not self.top:
            self.create_widgets()
        else:
            self.top.deiconify()
            self.top.tkraise()
        if searchphrase:
            self.ent.delete(0,"end")
            self.ent.insert("end",searchphrase)
        self.ent.focus_set()
        self.ent.selection_range(0, "end")
        self.ent.icursor(0)
        self.top.grab_set()

    def close(self, event=None):
        if self.top:
            self.top.grab_release()
            self.top.withdraw()

    def create_widgets(self):
        top = Toplevel(self.root)
        top.bind("<Return>", self.default_command)
        top.bind("<Escape>", self.close)
        top.protocol("WM_DELETE_WINDOW", self.close)
        top.wm_title(self.title)
        top.wm_iconname(self.icon)
        self.top = top

        self.row = 0
        self.top.grid_columnconfigure(0, pad=2, weight=0)
        self.top.grid_columnconfigure(1, pad=2, minsize=100, weight=100)

        self.create_entries()
        self.create_option_buttons()
        self.create_other_buttons()
        return self.create_command_buttons()

    def make_entry(self, label, var):
        l = Label(self.top, text=label)
        l.grid(row=self.row, column=0, sticky="nw")
        e = Entry(self.top, textvariable=var, exportselection=0)
        e.grid(row=self.row, column=1, sticky="nwe")
        self.row = self.row + 1
        return e

    def make_frame(self,labeltext=None):
        if labeltext:
            l = Label(self.top, text=labeltext)
            l.grid(row=self.row, column=0, sticky="nw")
        f = Frame(self.top)
        f.grid(row=self.row, column=1, columnspan=1, sticky="nwe")
        self.row = self.row + 1
        return f

    def make_button(self, label, command, isdef=0):
        b = Button(self.buttonframe,
                   text=label, command=command,
                   default=isdef and "active" or "normal")
        cols,rows=self.buttonframe.grid_size()
        b.grid(pady=1,row=rows,column=0,sticky="ew")
        self.buttonframe.grid(rowspan=rows+1)
        return b

    def create_entries(self):
        self.ent = self.make_entry("Find:", self.engine.patvar)

    def create_option_buttons(self):
        f = self.make_frame("Options")

        btn = Checkbutton(f, anchor="w",
                variable=self.engine.revar,
                text="Regular expression")
        btn.pack(side="left", fill="both")
        if self.engine.isre():
            btn.select()

        btn = Checkbutton(f, anchor="w",
                variable=self.engine.casevar,
                text="Match case")
        btn.pack(side="left", fill="both")
        if self.engine.iscase():
            btn.select()

        btn = Checkbutton(f, anchor="w",
                variable=self.engine.wordvar,
                text="Whole word")
        btn.pack(side="left", fill="both")
        if self.engine.isword():
            btn.select()

        if self.needwrapbutton:
            btn = Checkbutton(f, anchor="w",
                    variable=self.engine.wrapvar,
                    text="Wrap around")
            btn.pack(side="left", fill="both")
            if self.engine.iswrap():
                btn.select()

    def create_other_buttons(self):
        f = self.make_frame("Direction")

        #lbl = Label(f, text="Direction: ")
        #lbl.pack(side="left")

        btn = Radiobutton(f, anchor="w",
                variable=self.engine.backvar, value=1,
                text="Up")
        btn.pack(side="left", fill="both")
        if self.engine.isback():
            btn.select()

        btn = Radiobutton(f, anchor="w",
                variable=self.engine.backvar, value=0,
                text="Down")
        btn.pack(side="left", fill="both")
        if not self.engine.isback():
            btn.select()

    def create_command_buttons(self):
        #
        # place button frame on the right
        f = self.buttonframe = Frame(self.top)
        f.grid(row=0,column=2,padx=2,pady=2,ipadx=2,ipady=2)

        b = self.make_button("close", self.close)
        b.lower()


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
24 May 2024 8.33 AM
root / linksafe
0755
Icons
--
24 May 2024 8.33 AM
root / linksafe
0755
__pycache__
--
24 May 2024 8.33 AM
root / linksafe
0755
idle_test
--
24 May 2024 8.33 AM
root / linksafe
0755
AutoComplete.py
8.869 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
AutoCompleteWindow.py
17.258 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
AutoExpand.py
2.425 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
Bindings.py
3.354 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
CREDITS.txt
1.821 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
CallTipWindow.py
5.761 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
CallTips.py
5.793 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ChangeLog
55.071 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
ClassBrowser.py
6.222 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
CodeContext.py
8.157 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ColorDelegator.py
10.222 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
Debugger.py
15.983 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
Delegator.py
0.649 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
EditorWindow.py
64.753 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
FileList.py
3.725 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
FormatParagraph.py
6.998 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
GrepDialog.py
4.015 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
HISTORY.txt
10.075 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
HyperParser.py
10.314 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
IOBinding.py
19.396 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
IdleHistory.py
4.021 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
MultiCall.py
17.118 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
MultiStatusBar.py
0.765 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
NEWS.txt
33.61 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
ObjectBrowser.py
3.661 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
OutputWindow.py
4.291 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ParenMatch.py
6.472 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
PathBrowser.py
2.811 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
Percolator.py
2.596 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
PyParse.py
18.959 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
PyShell.py
56.521 KB
17 Apr 2024 4.58 PM
root / linksafe
0755
README.txt
2.443 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
RemoteDebugger.py
11.747 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
RemoteObjectBrowser.py
0.941 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ReplaceDialog.py
5.692 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
RstripExtension.py
1.025 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ScriptBinding.py
7.88 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ScrolledList.py
3.903 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
SearchDialog.py
1.969 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
SearchDialogBase.py
5.063 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
SearchEngine.py
7.367 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
StackViewer.py
3.483 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
TODO.txt
8.279 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
ToolTip.py
2.672 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
TreeWidget.py
14.863 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
UndoDelegator.py
10.063 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
WidgetRedirector.py
4.372 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
WindowList.py
2.414 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
ZoomHeight.py
1.276 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
__init__.py
0.036 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
__main__.py
0.106 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
aboutDialog.py
6.421 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
config-extensions.def
2.723 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
config-highlight.def
1.699 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
config-keys.def
7.348 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
config-main.def
2.455 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
configDialog.py
51.611 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
configHandler.py
28.636 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
configHelpSourceEdit.py
6.567 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
configSectionNameDialog.py
4.213 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
dynOptionMenuWidget.py
1.277 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
extend.txt
3.557 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
help.txt
11.713 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
idle.py
0.391 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
idle.pyw
0.655 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
idlever.py
0.022 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
keybindingDialog.py
12.136 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
macosxSupport.py
7.004 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
rpc.py
20.462 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
run.py
13.373 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
tabbedpages.py
17.741 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
textView.py
3.462 KB
17 Apr 2024 4.58 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF