Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
318646e2
Commit
318646e2
authored
May 14, 2011
by
Jeremy Kajikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Weaver.py
Now displaying and handling Dynamic Layout, Absolute positioning completely removed
parent
66175f58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
12 deletions
+72
-12
weaver.py
weaver.py
+72
-12
No files found.
weaver.py
View file @
318646e2
...
@@ -15,44 +15,104 @@ try:
...
@@ -15,44 +15,104 @@ try:
class
AppWindow
(
wx
.
Frame
):
class
AppWindow
(
wx
.
Frame
):
def
__init__
(
self
):
def
__init__
(
self
):
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Weaver"
,
style
=
wx
.
MAXIMIZE_BOX
|
wx
.
RESIZE_BORDER
|
wx
.
SYSTEM_MENU
|
wx
.
CAPTION
|
wx
.
CLOSE_BOX
)
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Weaver"
)
self
.
menustrip
=
wx
.
MenuBar
()
self
.
menustrip
=
wx
.
MenuBar
()
m
=
wx
.
Menu
()
m
=
wx
.
Menu
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnOther
,
m
.
Append
(
wx
.
ID_ANY
,
" "
,
" "
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnLoadOpts
,
m
.
Append
(
wx
.
ID_ANY
,
"&Load Options"
,
" Load Configuration Settings"
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnSaveOpts
,
m
.
Append
(
wx
.
ID_ANY
,
"&Save Options"
,
" Save Configuration Settings"
))
m
.
AppendSeparator
()
m
.
AppendSeparator
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnExit
,
m
.
Append
(
wx
.
ID_EXIT
,
"Close"
,
" Closes the Window"
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnExit
,
m
.
Append
(
wx
.
ID_EXIT
,
"Close"
,
" Closes the Window"
))
self
.
menustrip
.
Append
(
m
,
"&Print"
)
self
.
menustrip
.
Append
(
m
,
"&Print"
)
m
=
wx
.
Menu
()
m
=
wx
.
Menu
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnOther
,
m
.
Append
(
wx
.
ID_ANY
,
" "
,
" "
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnPass
,
m
.
Append
(
wx
.
ID_ANY
,
" "
,
" "
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnOther
,
m
.
Append
(
wx
.
ID_ANY
,
" "
,
" "
))
self
.
menustrip
.
Append
(
m
,
"&Object"
)
self
.
menustrip
.
Append
(
m
,
"&Object"
)
m
=
wx
.
Menu
()
m
=
wx
.
Menu
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
On
Other
,
m
.
Append
(
wx
.
ID_ANY
,
"&Wiki"
,
" Http://www.reprap.org/wiki/Weaver"
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
On
Wiki
,
m
.
Append
(
wx
.
ID_ANY
,
"&Wiki"
,
" Http://www.reprap.org/wiki/Weaver"
))
m
.
AppendSeparator
()
m
.
AppendSeparator
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnAbout
,
m
.
Append
(
wx
.
ID_ABOUT
,
"&About"
,
" Information about this program"
))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnAbout
,
m
.
Append
(
wx
.
ID_ABOUT
,
"&About"
,
" Information about this program"
))
self
.
menustrip
.
Append
(
m
,
"&Help"
)
self
.
menustrip
.
Append
(
m
,
"&Help"
)
self
.
SetMenuBar
(
self
.
menustrip
)
self
.
SetMenuBar
(
self
.
menustrip
)
self
.
vroot
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
self
.
vlayout
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
self
.
vroot
.
Append
(
self
.
hSettings
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
))
hbox
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
vroot
.
Append
(
self
.
hControls
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
))
hbox
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
"Device :"
,
style
=
wx
.
ALIGN_CENTRE
),
0
,
wx
.
ALL
,
1
)
self
.
SerialPort
=
wx
.
ComboBox
(
self
,
-
1
,
self
.
PrintCancel
=
wx
.
Button
()
choices
=
[
"/dev/ttyUSB0"
,
"serial.device/0"
,
"COM1"
],
style
=
wx
.
CB_SIMPLE
|
wx
.
CB_DROPDOWN
|
wx
.
CB_SORT
)
hbox
.
Add
(
self
.
SerialPort
,
0
,
wx
.
ALL
,
1
)
hbox
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
"Speed :"
,
style
=
wx
.
ALIGN_CENTRE
),
0
,
wx
.
ALL
,
1
)
self
.
SerialSpeed
=
wx
.
ComboBox
(
self
,
-
1
,
choices
=
[
"2400"
,
"9600"
,
"19200"
,
"38400"
,
"57600"
,
"115200"
],
style
=
wx
.
CB_SIMPLE
|
wx
.
CB_DROPDOWN
|
wx
.
CB_READONLY
|
wx
.
CB_SORT
)
hbox
.
Add
(
self
.
SerialSpeed
,
0
,
wx
.
ALL
,
1
)
self
.
vlayout
.
Add
(
hbox
,
0
,
wx
.
ALL
|
wx
.
EXPAND
|
wx
.
ALIGN_CENTER_HORIZONTAL
,
1
)
self
.
hlayout
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
vbox
=
wx
.
BoxSizer
(
wx
.
VERTICAL
,
)
# GCode Shell
self
.
ShellHistory
=
[]
self
.
ShellView
=
wx
.
TextCtrl
(
self
)
vbox
.
Add
(
self
.
ShellView
,
0
,
wx
.
ALL
,
0
)
self
.
ShellProc
=
wx
.
ComboBox
(
self
,
-
1
,
choices
=
self
.
ShellHistory
,
style
=
wx
.
CB_SIMPLE
|
wx
.
CB_DROPDOWN
|
wx
.
CB_SORT
)
vbox
.
Add
(
self
.
ShellProc
,
0
,
wx
.
ALL
,
1
)
hbox
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
ShellClear
=
wx
.
Button
(
self
,
wx
.
ID_ANY
,
'Clear'
)
hbox
.
Add
(
self
.
ShellClear
,
0
,
wx
.
ALL
,
1
)
self
.
ShellSend
=
wx
.
Button
(
self
,
wx
.
ID_ANY
,
'Send'
)
hbox
.
Add
(
self
.
ShellSend
,
0
,
wx
.
ALL
,
1
)
vbox
.
Add
(
hbox
,
1
,
wx
.
ALL
,
1
)
self
.
hlayout
.
Add
(
vbox
,
1
,
wx
.
ALL
,
1
)
vbox
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
hbox
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
vbox
.
Add
(
hbox
,
0
,
wx
.
ALL
,
1
)
# Workflow
self
.
hlayout
.
Add
(
vbox
,
1
,
wx
.
ALL
,
1
)
vbox
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
# Wxyz
self
.
hlayout
.
Add
(
vbox
,
1
,
wx
.
ALL
,
1
)
self
.
vlayout
.
Add
(
self
.
hlayout
,
1
,
wx
.
ALL
|
wx
.
EXPAND
|
wx
.
ALIGN_CENTER_HORIZONTAL
,
1
)
self
.
SetSizer
(
self
.
vlayout
)
self
.
vlayout
.
Fit
(
self
)
self
.
Layout
()
self
.
EventBinding
()
self
.
CreateStatusBar
()
self
.
CreateStatusBar
()
self
.
Centre
()
self
.
Show
(
True
)
self
.
Show
(
True
)
def
EventBinding
(
self
):
pass
def
OnAbout
(
self
,
event
):
def
OnAbout
(
self
,
event
):
dlg
=
wx
.
MessageDialog
(
self
,
"Prusa - Mendel - RAMPS - Sprinter"
,
"About Weaver"
,
wx
.
OK
)
dlg
=
wx
.
MessageDialog
(
self
,
"Prusa - Mendel - RAMPS - Sprinter"
,
"About Weaver"
,
wx
.
OK
)
dlg
.
ShowModal
()
dlg
.
ShowModal
()
dlg
.
Destroy
()
dlg
.
Destroy
()
def
OnOther
(
self
,
event
):
def
OnLoadOpts
(
self
,
event
):
pass
def
OnSaveOpts
(
self
,
event
):
pass
def
OnWiki
(
self
,
event
):
pass
def
OnPass
(
self
,
event
):
pass
pass
def
OnExit
(
self
,
event
):
def
OnExit
(
self
,
event
):
self
.
Close
(
True
)
self
.
Close
(
True
)
def
OnShellProc
(
self
,
event
):
pass
def
OnShellClear
(
self
,
event
):
pass
def
OnShellSend
(
self
,
event
):
pass
except
:
except
:
print
(
"Library Failure -- Please install the wxPython Libraries"
)
print
(
"Library Failure -- Please install the wxPython Libraries"
)
quit
()
quit
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment