#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 1.0.4 on Sat Jun 24 02:03:15 2023
#
import wx
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class MyFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((400, 300))
self.SetTitle("PDF Converter")
self.panel_1 = wx.Panel(self, wx.ID_ANY)
sizer_1 = wx.BoxSizer(wx.VERTICAL)
label_1 = wx.StaticText(self.panel_1, wx.ID_ANY, u"PDFに変換するファイルを選択してください。")
sizer_1.Add(label_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
self.text_ctrl_1 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
sizer_1.Add(self.text_ctrl_1, 0, wx.EXPAND, 0)
self.button_1 = wx.Button(self.panel_1, wx.ID_ANY, u"ファイルを選択")
sizer_1.Add(self.button_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
label_2 = wx.StaticText(self.panel_1, wx.ID_ANY, u"サイズを選んでください。")
sizer_1.Add(label_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
self.combo_box_1 = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=["50%", "70%", "85%", "100%", "125%", "150%", "175%", "200%"], style=wx.CB_DROPDOWN)
self.combo_box_1.SetSelection(3)
sizer_1.Add(self.combo_box_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, u"出力ファイル名")
sizer_1.Add(label_3, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
self.text_ctrl_2 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "out")
sizer_1.Add(self.text_ctrl_2, 0, wx.EXPAND, 0)
self.button_2 = wx.Button(self.panel_1, wx.ID_ANY, u"変換")
sizer_1.Add(self.button_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
self.panel_1.SetSizer(sizer_1)
self.Layout()
self.Bind(wx.EVT_BUTTON, self.chooseFile, self.button_1)
self.Bind(wx.EVT_BUTTON, self.convert, self.button_2)
# end wxGlade
def chooseFile(self, event): # wxGlade: MyFrame.<event_handler>
print("Event handler 'chooseFile' not implemented!")
event.Skip()
def convert(self, event): # wxGlade: MyFrame.<event_handler>
print("Event handler 'convert' not implemented!")
event.Skip()
# end of class MyFrame
class MyDialog(wx.Dialog):
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.SetTitle("Open")
self.Layout()
# end wxGlade
# end of class MyDialog
class MyApp(wx.App):
def OnInit(self):
self.frame = MyFrame(None, wx.ID_ANY, "")
self.SetTopWindow(self.frame)
self.frame.Show()
return True
# end of class MyApp
if __name__ == "__main__":
App = MyApp(0)
App.MainLoop()
IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwojIC0qLSBjb2Rpbmc6IFVURi04IC0qLQojCiMgZ2VuZXJhdGVkIGJ5IHd4R2xhZGUgMS4wLjQgb24gU2F0IEp1biAyNCAwMjowMzoxNSAyMDIzCiMKCmltcG9ydCB3eAoKIyBiZWdpbiB3eEdsYWRlOiBkZXBlbmRlbmNpZXMKIyBlbmQgd3hHbGFkZQoKIyBiZWdpbiB3eEdsYWRlOiBleHRyYWNvZGUKIyBlbmQgd3hHbGFkZQoKCmNsYXNzIE15RnJhbWUod3guRnJhbWUpOgogICAgZGVmIF9faW5pdF9fKHNlbGYsICphcmdzLCAqKmt3ZHMpOgogICAgICAgICMgYmVnaW4gd3hHbGFkZTogTXlGcmFtZS5fX2luaXRfXwogICAgICAgIGt3ZHNbInN0eWxlIl0gPSBrd2RzLmdldCgic3R5bGUiLCAwKSB8IHd4LkRFRkFVTFRfRlJBTUVfU1RZTEUKICAgICAgICB3eC5Gcm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