WIP
This commit is contained in:
+6
-3
@@ -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}.
|
||||||
|
|||||||
Reference in New Issue
Block a user