FunctionGUI 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ import tkinter as tk
2
+ from tkinter import ttk
3
+
4
+ from tkinter import font as tkfont
5
+ from PIL import Image, ImageTk
6
+
7
+ def Window():
8
+ root = tk.Tk()
9
+ return root
10
+
11
+ def Title(root, title = "New Window"):
12
+ a = root.title(title)
13
+ return a
14
+
15
+ def Label(parent, text="Default Text", font="Helvetica", size=12, color="black"):
16
+ label = ttk.Label(parent, text=text, font = (font, size), foreground = color); label.pack();
17
+ return label
18
+
19
+ def Place(widget, x, y):
20
+ widget.place(x=x, y=y)
21
+
22
+ def Font(name = 'arial', size = 20, weight = 10):
23
+ font = tkfont.Font(family=name, size=size, weight=weight)
24
+ return font
25
+
26
+
27
+ def BGImage(parent, bg_image_path = '', width=400 , height=300):
28
+ # Load and set the background image
29
+ bg_image = Image.open(bg_image_path)
30
+ bg_image = bg_image.resize((width, height), Image.ANTIALIAS)
31
+ bg_photo = ImageTk.PhotoImage(bg_image)
32
+
33
+ background_label = tk.Label(parent, image=bg_photo)
34
+ background_label.image = bg_photo # Keep a reference to avoid garbage collection
35
+ background_label.place(x=0, y=0, relwidth=1, relheight=1)
36
+
37
+ def Button(parent, text="Button", command=None, font="Helvetica", size=12, bg="black", fg="black", width=20, height=20, padx = 10, pady = 10):
38
+ button = tk.Button(parent, text=text, command=command, font=(font, size), bg=bg, fg=fg, width=width, height=height)
39
+ button.pack(padx=padx, pady=pady)
40
+ return button
41
+
42
+ def Entry(parent, width=20, font="Helvetica", size=12, bg="white", fg="black", padx = 10, pady = 10):
43
+ entry = ttk.Entry(parent, width=width, font=(font, size), background=bg, foreground=fg)
44
+ entry.pack(padx=padx, pady=pady)
45
+ return entry
46
+
47
+ def GetEntry(entry):
48
+ d = entry.get()
49
+ return entry
50
+
51
+ def Run(window):
52
+ window.mainloop()
@@ -0,0 +1,14 @@
1
+ # __init__.py
2
+
3
+ from .FunctionGUI import (
4
+ Window,
5
+ Title,
6
+ Label,
7
+ Place,
8
+ Font,
9
+ BGImage,
10
+ Button,
11
+ Entry,
12
+ GetEntry,
13
+ Run
14
+ )
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.1
2
+ Name: FunctionGUI
3
+ Version: 0.1.0
4
+ Summary: A simple Tkinter GUI library with basic widgets and functionality.
5
+ Home-page: https://github.com/aa425/FunctionGUI
6
+ Author: Aaroh Charne
7
+ Author-email: aaroh.charne@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Natural Language :: English
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: Pillow
18
+
19
+ # FunctionGUI
20
+
21
+ FunctionGUI is a simple GUI library built using tkinter, designed to help you quickly create graphical user interfaces with ease.
22
+
23
+ ## Installation
24
+
25
+ To install FunctionGUI, you can simply use pip:
26
+
27
+ ```bash
28
+ pip install functiongui
29
+ ```
30
+
31
+ ```python
32
+ # FunctionGUI
33
+
34
+ FunctionGUI is a simple GUI library built using tkinter, designed to help you quickly create graphical user interfaces with ease. This library can currently complete the most basic tasks of Tkinter and does not contain much functionality, but will have more features in the future.
35
+
36
+ ## Installation
37
+
38
+ To install FunctionGUI, you can simply use pip:
39
+
40
+ ```bash
41
+ pip install functiongui
42
+ ```
43
+ ## Usage
44
+ ```python
45
+ import functiongui as fg
46
+
47
+ # Create a window
48
+ root = fg.Window()
49
+
50
+ # Set the title of the window
51
+ fg.Title(root, "New Window")
52
+
53
+ # Create a custom font
54
+ custom_font = fg.Font(name='Helvetica', size=16, weight='bold')
55
+
56
+ # Create and place a label with the custom font
57
+ label = fg.Label(root, text="Hello, World!", font='Helvetica', size=16, color="blue")
58
+
59
+ # Create and place a button
60
+ button = fg.Button(root, text="Click Me", command=lambda: print("Button clicked!"))
61
+
62
+ # Create and place an entry field
63
+ entry = fg.Entry(root, width=20, font="Helvetica", size=12, bg="white", fg="black", padx = 10, pady = 10)
64
+
65
+ # Retrieve and print the text from the entry field on button click
66
+ def on_button_click():
67
+ text = fg.GetEntry(entry)
68
+ print(text.get())
69
+
70
+ button = fg.Button(root, text="Print Entry", command=on_button_click)
71
+
72
+ # Set a background image
73
+ fg.BGImage(root, bg_image_path='path_to_image.jpg', width = 300, height = 600)
74
+
75
+ # Place a widget on a specific coordinate on the window
76
+ Place(button, 60, 100)
77
+
78
+ # Run the main loop
79
+ fg.Run(root)
80
+ ```
81
+
82
+ ## Bugs
83
+
84
+ If you are finding bugs in the code, please report them to me @aaroh.charne@gmail.com.
85
+ Please include a snippet of your code as well the problem. Thank You
86
+
87
+ ## Please check out my other Library Calclab @https://pypi.org/project/Calclab/
88
+ ```
@@ -0,0 +1,9 @@
1
+ README.md
2
+ setup.py
3
+ FunctionGUI/FunctionGUI.py
4
+ FunctionGUI/__init__.py
5
+ FunctionGUI.egg-info/PKG-INFO
6
+ FunctionGUI.egg-info/SOURCES.txt
7
+ FunctionGUI.egg-info/dependency_links.txt
8
+ FunctionGUI.egg-info/requires.txt
9
+ FunctionGUI.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ Pillow
@@ -0,0 +1 @@
1
+ FunctionGUI
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.1
2
+ Name: FunctionGUI
3
+ Version: 0.1.0
4
+ Summary: A simple Tkinter GUI library with basic widgets and functionality.
5
+ Home-page: https://github.com/aa425/FunctionGUI
6
+ Author: Aaroh Charne
7
+ Author-email: aaroh.charne@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Natural Language :: English
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: Pillow
18
+
19
+ # FunctionGUI
20
+
21
+ FunctionGUI is a simple GUI library built using tkinter, designed to help you quickly create graphical user interfaces with ease.
22
+
23
+ ## Installation
24
+
25
+ To install FunctionGUI, you can simply use pip:
26
+
27
+ ```bash
28
+ pip install functiongui
29
+ ```
30
+
31
+ ```python
32
+ # FunctionGUI
33
+
34
+ FunctionGUI is a simple GUI library built using tkinter, designed to help you quickly create graphical user interfaces with ease. This library can currently complete the most basic tasks of Tkinter and does not contain much functionality, but will have more features in the future.
35
+
36
+ ## Installation
37
+
38
+ To install FunctionGUI, you can simply use pip:
39
+
40
+ ```bash
41
+ pip install functiongui
42
+ ```
43
+ ## Usage
44
+ ```python
45
+ import functiongui as fg
46
+
47
+ # Create a window
48
+ root = fg.Window()
49
+
50
+ # Set the title of the window
51
+ fg.Title(root, "New Window")
52
+
53
+ # Create a custom font
54
+ custom_font = fg.Font(name='Helvetica', size=16, weight='bold')
55
+
56
+ # Create and place a label with the custom font
57
+ label = fg.Label(root, text="Hello, World!", font='Helvetica', size=16, color="blue")
58
+
59
+ # Create and place a button
60
+ button = fg.Button(root, text="Click Me", command=lambda: print("Button clicked!"))
61
+
62
+ # Create and place an entry field
63
+ entry = fg.Entry(root, width=20, font="Helvetica", size=12, bg="white", fg="black", padx = 10, pady = 10)
64
+
65
+ # Retrieve and print the text from the entry field on button click
66
+ def on_button_click():
67
+ text = fg.GetEntry(entry)
68
+ print(text.get())
69
+
70
+ button = fg.Button(root, text="Print Entry", command=on_button_click)
71
+
72
+ # Set a background image
73
+ fg.BGImage(root, bg_image_path='path_to_image.jpg', width = 300, height = 600)
74
+
75
+ # Place a widget on a specific coordinate on the window
76
+ Place(button, 60, 100)
77
+
78
+ # Run the main loop
79
+ fg.Run(root)
80
+ ```
81
+
82
+ ## Bugs
83
+
84
+ If you are finding bugs in the code, please report them to me @aaroh.charne@gmail.com.
85
+ Please include a snippet of your code as well the problem. Thank You
86
+
87
+ ## Please check out my other Library Calclab @https://pypi.org/project/Calclab/
88
+ ```
@@ -0,0 +1,70 @@
1
+ # FunctionGUI
2
+
3
+ FunctionGUI is a simple GUI library built using tkinter, designed to help you quickly create graphical user interfaces with ease.
4
+
5
+ ## Installation
6
+
7
+ To install FunctionGUI, you can simply use pip:
8
+
9
+ ```bash
10
+ pip install functiongui
11
+ ```
12
+
13
+ ```python
14
+ # FunctionGUI
15
+
16
+ FunctionGUI is a simple GUI library built using tkinter, designed to help you quickly create graphical user interfaces with ease. This library can currently complete the most basic tasks of Tkinter and does not contain much functionality, but will have more features in the future.
17
+
18
+ ## Installation
19
+
20
+ To install FunctionGUI, you can simply use pip:
21
+
22
+ ```bash
23
+ pip install functiongui
24
+ ```
25
+ ## Usage
26
+ ```python
27
+ import functiongui as fg
28
+
29
+ # Create a window
30
+ root = fg.Window()
31
+
32
+ # Set the title of the window
33
+ fg.Title(root, "New Window")
34
+
35
+ # Create a custom font
36
+ custom_font = fg.Font(name='Helvetica', size=16, weight='bold')
37
+
38
+ # Create and place a label with the custom font
39
+ label = fg.Label(root, text="Hello, World!", font='Helvetica', size=16, color="blue")
40
+
41
+ # Create and place a button
42
+ button = fg.Button(root, text="Click Me", command=lambda: print("Button clicked!"))
43
+
44
+ # Create and place an entry field
45
+ entry = fg.Entry(root, width=20, font="Helvetica", size=12, bg="white", fg="black", padx = 10, pady = 10)
46
+
47
+ # Retrieve and print the text from the entry field on button click
48
+ def on_button_click():
49
+ text = fg.GetEntry(entry)
50
+ print(text.get())
51
+
52
+ button = fg.Button(root, text="Print Entry", command=on_button_click)
53
+
54
+ # Set a background image
55
+ fg.BGImage(root, bg_image_path='path_to_image.jpg', width = 300, height = 600)
56
+
57
+ # Place a widget on a specific coordinate on the window
58
+ Place(button, 60, 100)
59
+
60
+ # Run the main loop
61
+ fg.Run(root)
62
+ ```
63
+
64
+ ## Bugs
65
+
66
+ If you are finding bugs in the code, please report them to me @aaroh.charne@gmail.com.
67
+ Please include a snippet of your code as well the problem. Thank You
68
+
69
+ ## Please check out my other Library Calclab @https://pypi.org/project/Calclab/
70
+ ```
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,26 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='FunctionGUI', # Replace with your library name
5
+ version='0.1.0', # Start with an initial version
6
+ description='A simple Tkinter GUI library with basic widgets and functionality.',
7
+ long_description=open('README.md').read(), # Make sure you have a README.md file
8
+ long_description_content_type='text/markdown',
9
+ author='Aaroh Charne', # Replace with your name
10
+ author_email='aaroh.charne@gmail.com', # Replace with your email
11
+ url='https://github.com/aa425/FunctionGUI', # Replace with your library's URL
12
+ packages=find_packages(), # Automatically find packages in the directory
13
+ install_requires=[
14
+ 'Pillow',
15
+ ],
16
+ classifiers=[
17
+ 'Programming Language :: Python :: 3',
18
+ 'License :: OSI Approved :: MIT License',
19
+ 'Operating System :: OS Independent',
20
+ 'Development Status :: 3 - Alpha',
21
+ 'Intended Audience :: Developers',
22
+ 'Natural Language :: English',
23
+ 'Topic :: Software Development :: Libraries :: Python Modules',
24
+ ],
25
+ python_requires='>=3.6', # Specify the Python version required
26
+ )