Make Contract Calls Great Again #35

Merged
zxq9 merged 37 commits from iface3 into master 2026-05-10 15:39:25 +09:00
Showing only changes of commit 0a671e7c9c - Show all commits
+6 -3
View File
@@ -124,7 +124,6 @@ init({Prefs, {FunName, FunType}, ConID, Build, Selected, Keys}) ->
_ = wxFrame:setSizer(Frame, MainSz), _ = wxFrame:setSizer(Frame, MainSz),
_ = wxFrame:setSize(Frame, Dimensions), _ = wxFrame:setSize(Frame, Dimensions),
_ = wxSizer:layout(MainSz), _ = wxSizer:layout(MainSz),
ok = gd_v:safe_size(Frame, Prefs),
ok = wxFrame:connect(Frame, close_window), ok = wxFrame:connect(Frame, close_window),
ok = wxFrame:connect(Frame, command_button_clicked), ok = wxFrame:connect(Frame, command_button_clicked),
true = wxFrame:show(Frame), true = wxFrame:show(Frame),
@@ -171,11 +170,12 @@ call_sizer(Frame, J, CallArgs) ->
{Name, C} {Name, C}
end, end,
Controls = lists:map(AddArg, CallArgs), Controls = lists:map(AddArg, CallArgs),
{CallSz, Controls, {600, 700}}. {CallSz, Controls, {500, 900}}.
return_sizer(Frame, J, ReturnType) -> return_sizer(Frame, J, ReturnType) ->
ReturnSz = wxStaticBoxSizer:new(?wxVERTICAL, Frame, [{label, J("Return Type")}]), ReturnSz = wxStaticBoxSizer:new(?wxVERTICAL, Frame, [{label, J("Return Type")}]),
Return = wxStaticText:new(Frame, ?wxID_ANY, textify(ReturnType)), ReturnSzBox = wxStaticBoxSizer:getStaticBox(ReturnSz),
Return = wxStaticText:new(ReturnSzBox, ?wxID_ANY, textify(ReturnType)),
_ = wxStaticBoxSizer:add(ReturnSz, Return, zxw:flags({wide, 5})), _ = wxStaticBoxSizer:add(ReturnSz, Return, zxw:flags({wide, 5})),
ReturnSz. ReturnSz.
@@ -242,6 +242,9 @@ handle_event(#wx{event = #wxCommand{type = command_button_clicked}, id = ID},
State = #s{copy = #w{id = ID}}) -> State = #s{copy = #w{id = ID}}) ->
ok = copy(State), ok = copy(State),
{noreply, State}; {noreply, State};
handle_event(#wx{event = #wxClose{}}, State = #s{frame = Frame}) ->
ok = wxWindow:destroy(Frame),
{noreply, State};
handle_event(Event, State) -> handle_event(Event, State) ->
ok = tell(info, "Unexpected event ~tp State: ~tp~n", [Event, State]), ok = tell(info, "Unexpected event ~tp State: ~tp~n", [Event, State]),
{noreply, State}. {noreply, State}.