Metadata-Version: 2.4
Name: terra-tk
Version: 0.1.1
Summary: A beginner wrapper for Tkinter
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# TerraTk 

> A beginner wrapper for Tkinter

## Installation

```bash
pip install terra-tk
```

## Example

```python
import terratk as tt

screen = tt.Screen(
    title="My Screen", # title of the screen
    width=800, # width of the screen
    height=600, # height of the screen
    background=tt.constant.SYSTEMBUTTONFACE, # background color of the screen
    resizable_width=True, # whether the screen is resizable in width
    resizable_height=True, # whether the screen is resizable in height
)

label = tt.Label(
    parent=screen.root, # parent widget
    text="Hello, World!", # text of the label
)
label.pack(pady=30) # pack the label

button = tt.Button(
    parent=screen.root, # parent widget
    text="Click me!", # text of the button
    command=lambda: tt.messagebox(
        title="Message Box", # title of the messagebox
        text="This is a message box!", # text of the messagebox
        box=tt.constant.INFO, # type of the messagebox
    ),
)

button.pack(pady=30) # pack the button

screen.mainloop() # mainloop
```

## Screen

```python
screen = tt.Screen(
    title="My Screen", # title of the screen
    width=800, # width of the screen
    height=600, # height of the screen
    background=tt.constant.SYSTEMBUTTONFACE, # background color of the screen
    resizable_width=True, # whether the screen is resizable in width
    resizable_height=True, # whether the screen is resizable in height
)
```

screen mainloop

```python
screen.mainloop()
```

screen destroy

```python
screen.destroy()
```

## Widgets

### Label

```python
label = tt.Label(
    screen.root, # parent widget
    text="Hello, World!", # text of the label
)
```

### Button

```python
button = tt.Button(
    screen.root, # parent widget
    text="Close",
    command=screen.destroy, # function to be called when button is clicked
)
```

### Message Box

```python
tt.messagebox(
    text="Hello, World!", # text of the messagebox
    title="Message Box", # title of the messagebox
    box=tt.constant.INFO, # type of the messagebox
)
```

## Version

```python
import terratk as tt

print(tt.__version__)
```

## Requirements

- Python 3.9+
- Tkinter

## License

MIT License
