Commit 1b93203f authored by Dick Hollenbeck's avatar Dick Hollenbeck

Better GITHUB class header documentation, better eeschema library field dialog...

Better GITHUB class header documentation, better eeschema library field dialog stretching and title.
parent cd9da9dd
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013) // C++ code generated with wxFormBuilder (version Nov 5 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -43,7 +43,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE ...@@ -43,7 +43,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
bSizerFiledsList->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); bSizerFiledsList->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
bSizerFieldsSetup->Add( bSizerFiledsList, 1, wxEXPAND, 5 ); bSizerFieldsSetup->Add( bSizerFiledsList, 3, wxEXPAND, 5 );
wxBoxSizer* fieldEditBoxSizer; wxBoxSizer* fieldEditBoxSizer;
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
...@@ -179,7 +179,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE ...@@ -179,7 +179,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
bSizerFieldsSetup->Add( fieldEditBoxSizer, 0, wxEXPAND, 5 ); bSizerFieldsSetup->Add( fieldEditBoxSizer, 2, wxEXPAND, 5 );
mainSizer->Add( bSizerFieldsSetup, 1, wxEXPAND, 5 ); mainSizer->Add( bSizerFieldsSetup, 1, wxEXPAND, 5 );
......
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property> <property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
...@@ -45,7 +47,7 @@ ...@@ -45,7 +47,7 @@
<property name="size">-1,-1</property> <property name="size">-1,-1</property>
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property> <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">Fields Properties</property> <property name="title">Field Properties</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
...@@ -103,17 +105,17 @@ ...@@ -103,17 +105,17 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">3</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerFiledsList</property> <property name="name">bSizerFiledsList</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">8</property> <property name="border">8</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxListCtrl" expanded="1"> <object class="wxListCtrl" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
...@@ -214,11 +216,11 @@ ...@@ -214,11 +216,11 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="1"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
...@@ -302,11 +304,11 @@ ...@@ -302,11 +304,11 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="1"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
...@@ -390,11 +392,11 @@ ...@@ -390,11 +392,11 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="1"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
...@@ -483,7 +485,7 @@ ...@@ -483,7 +485,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">2</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">fieldEditBoxSizer</property> <property name="name">fieldEditBoxSizer</property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013) // C++ code generated with wxFormBuilder (version Nov 5 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -80,7 +80,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog ...@@ -80,7 +80,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
public: public:
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Field Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE(); ~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
}; };
......
...@@ -31,57 +31,88 @@ struct GH_CACHE; ...@@ -31,57 +31,88 @@ struct GH_CACHE;
/** /**
* Class GITHUB_PLUGIN Class GITHUB_PLUGIN
* implements a portion of pcbnew PLUGIN to provide read only access to a github implements a portion of pcbnew PLUGIN to provide read only access to a github
* repo consisting of pretty footprints. It could have used version 3 of the repo consisting of pretty footprints. It could have used version 3 of the
github.com API documented here: github.com API documented here:
<code>
<pre>
http://developer.github.com http://developer.github.com
https://help.github.com/articles/creating-an-access-token-for-command-line-use https://help.github.com/articles/creating-an-access-token-for-command-line-use
</code> </pre>
but it does not. Rather it simply reads in a zip file of the repo and unzips it
from RAM as needed. Therefore the PLUGIN is read only for accessing but it does not. Rather it simply reads in a zip file of the repo and unzips
remote pretty libraries. The "Library Path" in the fp-lib-table should be set it from RAM as needed. <b>Therefore the PLUGIN is read only for accessing
to the full https:// URL. For example: remote pretty libraries at https://github.com.</b> The "Library Path" in the
<code> fp-lib-table row for a Github library should be set to the full https:// URL.
For example:
<pre>
https://github.com/liftoff-sr/pretty_footprints https://github.com/liftoff-sr/pretty_footprints
</code> </pre>
This is typically
<pre>
https://github.com/user_name/repo_name
</pre>
<p>
This PLUGIN also supports "Copy On Write", a.k.a. "COW". Thus a Github
library defined in either the fp-lib-table (project or global) will take an
optional option called <b>allow_pretty_writing_to_this_dir</b>. This option
is essentially the "Library Path" for a local Kicad (pretty) library which is
combined to make up the Github library found in the same fp-lib-table row. If
the option is missing, then the Github library is read only as always. If the
option is present for a Github library, then any writes to this library will
go to the local *.pretty directory. Note that the github.com resident portion
of this hybrid COW library is always read only, meaning you cannot delete
anything or modify any footprint at github directly.
<p>
This is typically https://github.com/user_name/repo_name Any footprint loads will always give precedence to the local footprints found
in the pretty dir given by option <b>allow_pretty_writing_to_this_dir</b>. So
once you have written to the COW library's local directory by doing a
footprint save, no github updates will be seen when loading a footprint by
the same name as one for which you've written locally.
<p> <p>
This PLUGIN also supports "Copy On Write", a.k.a "COW". So a library defined
in the fp-lib-table will take an optional option called Always keep a separate local *.pretty directory for each Github library,
<b>allow_pretty_writing_to_this_dir</b> which is essentially the lib_path for never combine them by referring to the same directory more than once. Also,
a local Kicad (pretty) library which is combined to make up the Github library. do not also use the same COW (*.pretty) directory in a "Kicad" fp-lib-table
If the option is missing, then the Github library is read only. If it is present, entry. This would likely create a mess. The COW directory should be manually
then any writes will go to the local *.pretty directory. Any reads will always created in advance, and the directory name must end with ".pretty". The value
give precedence to the local footprints. So once you have written to the local of the option <b>allow_pretty_writing_to_this_dir</b> will be path
directory, no github updates will travel down on any footprints for which you've substituted with any environment variable strings embedded, just like the
written locally. Always keep a separate local *.pretty directory for each Github
library, never combine them you will likely create a mess. You must manually
create the local directory in advance, and the directory name must end with ".pretty".
The option <b>allow_pretty_writing_to_this_dir</b> will be path substituted with
any environment variable strings embedded in the option's value, just like the
"Library Path" is. "Library Path" is.
<p> <p>
What's the point of COW? It is to turbo charge the sharing of footprints. If you
periodically email your COW pretty footprints to the Github repo maintainer, What's the point of COW? It is to turbo-charge the sharing of footprints. If
you can help update the Github copy. The idea should be to keep the COW file you periodically email your COW pretty footprint modifications to the Github
set as small as possible. After you've received confirmation that your changes repo maintainer, you can help update the Github copy. Simply email the
have been committed up at github.com, you can safely delete your COW file(s) individual *.kicad_mod file you find in your COW directories. After you've
and those from github.com will flow down. received confirmation that your changes have been committed up at github.com,
you can safely delete your COW file(s) and those from github.com will flow
down. Your goal should be to keep the COW file set as small as possible by
contributing frequently to the shared master copies at https://github.com.
<p> <p>
Note that if you use the module editor to delete a footprint and it is present
in the COW local dir, it will get deleted from there. However, it may not
be deleted from the library as a whole if the footprint of the same name also
existed in the github repo. In this case deleting the local copy will simply
unmask the one at the github repo. Remember, it is masked out if there is
a local COW copy, since the local copy always takes precedence.
* Note that if you use the module editor to delete a footprint and it is
* @author Dick Hollenbeck present in the COW local dir, it will get deleted from there. However, it may
* @date Original date: 10-Sep-2013 not be deleted from the library as a whole if the footprint of the same name
also exists in the github repo. In this case deleting the local copy will
simply unmask the one at the github repo. Remember, it is masked out if there
is a local COW copy, since the local copy always takes precedence. And
remember you cannot modify the github copy except by emailing a COW
modification to the repo maintainer.
@author Dick Hollenbeck
@date Original date: 10-Sep-2013
*/ */
class GITHUB_PLUGIN : public PCB_IO class GITHUB_PLUGIN : public PCB_IO
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment