Commit Graph

16 Commits

Author SHA1 Message Date
Diogo Condeco 75ffcbcef5 MACOS Setfocus and CancelButtonIssue moved into dialog_shim.
Setfocus now works on macos dialogs by setting DLGSHIM_USE_SETFOCUS.
This option is only enabled __WXMAC__ is defined.

FixOSXCancelButtonIssue() is now called inside DIALOG_SHIM::SHOW.
All other calls from within the dialogs were removed.
2017-01-29 23:51:35 +01:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
jean-pierre charras 98bc4d3ba1 Fix dialog size issues (some widgets have a incorrect size when initialized inside a TransferToWindow() method because the SetSizeHints() method was called before the init) and fix OS X copy/close bug in a few dialogs. 2016-07-14 16:25:35 +02:00
jean-pierre charras 4a20f376a3 Move call of SetSizeHints in a few dialogs form the dlg ctor to a wxInitDialogEvent event, because some widgets sizes are not fully initialized before this event is fired.
It is especially true in some Window Managers like KDE, but can be true in any WM, when initializations are made by TransferDataToWindow() method, called by the default wxInitDialogEvent handler.
2016-07-02 18:32:03 +02:00
jean-pierre charras 0eea3cffcf DIALOG_SHIM: add void FinishDialogSettings() method which calls the usual methods at end of a dialog, to ensure proper size and position, the first time the dialog is called.
Fix an incorrect size of dialog_pcb_text_properties (due to the fact the dialog was not really initialized when its min size was calculated)
2016-07-02 11:35:52 +02:00
Wayne Stambaugh f239aee1ad Fix quasi-modal dialog mode in DIALOG_SHIM class.
* Add event handler to check all button clicks for default command event
  IDs and handle them appropriately by either calling EndQuasiModal() or
  passing the event up the event handler chain to allow the default dialog
  handlers to perform their magic.
* Add event handler to handle the close window event properly.
* Add scope brackets so the wxBusyCursor will stop being displayed when
  the footprint library loading is complete in CvPcb.
2016-04-11 19:39:43 -04:00
Simon Wells 09ef795a02 Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
jean-pierre charras 6cc91a074b Remove a few conditional compilation for wxWidgets version < 3.0
Update a old .fbp file.
2015-11-09 13:14:28 +01:00
Dick Hollenbeck 49538cafb9 https://lists.launchpad.net/kicad-developers/msg14286.html 2014-08-17 18:00:49 -05:00
Dick Hollenbeck 80a402a369 wx 2.8 now builds, but the quasi-modal support seems broken on 2.8. Wanted others to be able to build at least. 2014-05-04 14:57:44 -05:00
Dick Hollenbeck a2227a75b4 Modular-Kicad milestone B), minor portions:
*) KIWAY_PLAYER::IsModal() is now a retained state, controlled by SetModal()

*) Fully re-work the KIWAY_PLAYER::ShowModal() to use a nested event loop.

*) Add support to DIALOG_SHIM for a "quasi-modal" dialog presentation and mode.
   See top of dialog_shim.cpp about that for benefits and need.

*) You can now pick footprint from the schematic component field dialog, although
   if you do this before you open the BOARD, you will only get the global footprint
   libraries, not also the project specific ones.  Opening the BOARD first avoids this
   problem.

This is the first example of cross KIFACE invocation, it is also the first
instance of using a TOP_FRAME other than FRAME_PCB as the first thing. It works,
but it's missing support for opening the project specific table because
historically the FRAME_PCB did that. This is now starting to expose all the near
term needs for KIWAY_PLAYER <-> PROJECT interaction, independence and out of
sequence usage.

A fix for this will be coming in a few days.

However it mostly starts to show why the KIWAY is terribly useful and important.
2014-05-04 13:22:27 -05:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
Dick Hollenbeck 6aabb9bc38 EDA_LIST_DIALOG_BASE is used multiple times for different numbers of
columns.  DIALOG_SHIM would resize each separate usage to the same
size.  DIALOG_SHIM now supports and alternate m_hash_key in lieu
of the class name, optionally.
2013-11-17 00:04:20 -06:00
Dick Hollenbeck 07273ac439 fix goof-ed preprocessor test 2013-01-18 00:13:31 -06:00
Dick Hollenbeck 00d865c173 Enhance DIALOG_SHIM to optionally call SetFocus() after the derived class's constructor has been called, for wx 2.8 and wxGTK 2013-01-18 00:04:25 -06:00
Dick Hollenbeck 31a84b84ec Add include/dialog_shim.h and common/dialog_shim.cpp for use by wxformbuilder's "subclass a wxDialog" support.
This works, but in my version of wxformbuilder there is a bug which does not properly show the 
subclass property, even though it is still in play.  This happens after saving then loading the *.fbp file.
So it is a nuisance bug, but does not affect functionality.
2012-03-22 02:02:49 -05:00