Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Majdi Sobain authored and Majdi Sobain committed May 12, 2017
1 parent 1992738 commit 60892ae
Show file tree
Hide file tree
Showing 76 changed files with 7,860 additions and 6,819 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Ring_WinCReg

Ring WinCReg extension is a very light, easy, and powerful extension for Ring Programming Language that has been made to bring all means of easiness in the dealing with Windows Registry. It gives you the ability to do from minor registry needs like saving or restoring settings to more superior goals like reaching and controlling every single key or value in the whole registry tree.
Ring WinCReg extension is a very light, easy, and powerful extension for Ring Programming Language that has been made to bring all means of easiness in the dealing with Windows Registry. It gives you the ability to do from minor registry needs like saving or restoring settings to more superior goals like reaching and manipulating every single key or value in the whole registry tree.

This extension has been made on top of previously created C++ language class called “Registry Wrapper Class(CRegisry Class)” that has been published on CodeProject in [this article](http://www.codeproject.com/Articles/8953/Registry-Wrapper-Class-CRegistry).

## RCRegistry Class
## RCRegistry Class Library

RCRegistry class, stands for Ring CRegistry Class or CRegistry Class for Ring, is a Ring Class that has been made to make using ring_wincreg extension functions easier by using the style of using “Registry Wrapper Class” in C++. I found this style is reasonable and readable better than just using the ring_wincreg original functions. It can be used by loading the file that contain it (wincreg.ring).

Note: RCRegistry Class in Ring_WinCReg Extension is now compatible with Ring 1.1 only.
Note: RCRegistry Class in Ring_WinCReg Extension is now compatible with Ring 1.1 and above.

It will show errors if used with Ring 1.0.

Expand Down Expand Up @@ -50,7 +50,9 @@ This is a simple ring code that use this extension:

3- [The documentation website](http://ring-wincreg.sourceforge.net/)

4- [The article of the original C++ Class (CRegistry Wrapper)](http://www.codeproject.com/Articles/8953/Registry-Wrapper-Class-CRegistry)
4- [The Ring Programming Language](http://ring-lang.net/)

5- [The article of the original C++ Class (CRegistry Wrapper)](http://www.codeproject.com/Articles/8953/Registry-Wrapper-Class-CRegistry)


## How to Compile
Expand Down
32 changes: 32 additions & 0 deletions docs/PrepareStyle.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off

echo backing up "bizstyle" old files

IF EXIST C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t.bak (
IF NOT EXIST C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t.bak.old (
REM if there is more than one time building, original bizstyle.js_t file will be untouched
copy C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t.bak C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t.bak.old
echo bizstyle.js_t.bak.old file created
)
)
copy C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t.bak
echo bisstyle.js_t.bak file created

IF EXIST C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html.bak (
IF NOT EXIST C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html.bak.old (
REM if there is more than one time building, original layout.html file will be untouched
copy C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html.bak C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html.bak.old
echo layout.html.bak.old file created
)
)
copy C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html.bak
echo layout.html.bak file created

echo Copying the modified files to be used instead
copy bizstyle.js_t C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\static\bizstyle.js_t
copy layout.html C:\Python27\Lib\site-packages\sphinx\themes\bizstyle\layout.html

echo Copying Ring_WinCReg logo to be used by documentation
copy logo.png .\build\html\logo.png

echo NOW you are ready to build docs :)
21 changes: 21 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ring_WinCReg Documentation

This directory contains files of ring_wincreg documentation as source and those which are already built.

## Building the source

You can build this documentation source using [Sphinx extension of Python Programming Language](http://www.sphinx-doc.org/en/stable/tutorial.html) .

BOFORE building we may need to prepare "bizstyle" theme of sphinx documentation that's used in this project to add Ring_WinCReg extension logo and home website link by running "PrepareStyle.bat" batch file.

## Building steps

1- Setup Python and its extension Sphinx.

2- (Optional) run "PrepareStyle.bat" batch file.

3- Run this command in COMMAND LINE(cmd):

make html

4- Enjoy ^_^
41 changes: 41 additions & 0 deletions docs/bizstyle.js_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// bizstyle.js
// ~~~~~~~~~~~
//
// Sphinx javascript -- for bizstyle theme.
//
// This theme was created by referring to 'sphinxdoc'
//
// :copyright: Copyright 2012-2014 by Sphinx team, see AUTHORS.
// :license: BSD, see LICENSE for details.
//
$(document).ready(function(){
if (navigator.userAgent.indexOf('iPhone') > 0 ||
navigator.userAgent.indexOf('Android') > 0) {
$("li.nav-item-0 a").text("Top");
}

$("div.related:first ul li:not(.right) a").slice(1).each(function(i, item){
if (item.text.length > 30) {
var tmpstr = item.text
$(item).attr("title", tmpstr);
$(item).text(tmpstr.substr(0, 27) + "...");
}
});
$("div.related:last ul li:not(.right) a").slice(1).each(function(i, item){
if (item.text.length > 30) {
var tmpstr = item.text
$(item).attr("title", tmpstr);
$(item).text(tmpstr.substr(0, 27) + "...");
}
});
});

$(window).resize(function(){
if ($(window).width() <= 776) {
$("li.nav-item-0 a").text("Top");
}
else {
$("li.nav-item-0 a").text("{{ shorttitle|e }}");
}
});
Binary file modified docs/build/doctrees/entries.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/extensionfunctions.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/implementation&usage.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/introduction.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/keys.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/values.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 332d1bf1530bce63fde0231b3aa662f5
config: 053fba15b894ea567d12f56542c977f5
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/build/html/_sources/entries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Dealing with Entries
=====================

Here, we are going to learn how to deal with registry entries by using "ring_wincreg" extension capabilities through RCRegistry class.
Here, we are going to learn how to deal with registry entries by using "ring_wincreg" extension capabilities through RCRegistry class library.

.. index::
pair: Dealing with Entries; Create Entry
Expand Down
2 changes: 2 additions & 0 deletions docs/build/html/_sources/extensionfunctions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Here we are going to know the whole list of functions that could be called direc

void cregsetexpandsz( CRegistry* keyhandle , string valuename , string value )

string creggetexpandedsz( CRegistry* keyhandle , string valuename )

void cregsetqword( CRegistry* keyhandle , string valuename , number\string value )

string creggetqword( CRegistry* keyhandle , string valuename )
Expand Down
33 changes: 16 additions & 17 deletions docs/build/html/_sources/implementation&usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ Implementation and Usage
Download and Implementation
============================

To use this extension you have to start with downloading it from GitHub following next steps:
To use this extension you have to start with downloading it following next steps:

1. Go to `the extension GitHub project <https://github.com/MajdiSobain/ring_wincreg>`_ page.
2. Download the project using the green button on the right upper corner of the page as a ZIP file.
3. Extract the contents of the bin folder and copy them to the bin folder that is present in the ring language folder ( where the "ring.exe" file is located ).
4. Load the extension and its features in the ring code by using load command as:
1. Download the extension from `GitHub <https://github.com/MajdiSobain/ring_wincreg/releases>`_ or `Sourceforge <https://sourceforge.net/projects/ring-wincreg>`_ pages.
2. Extract the contents of the bin folder and copy them to the bin folder that is present in the ring language folder ( where the "ring.exe" file is located ).
3. Load the extension and its features in the ring code by using load command as:

.. code-block:: none

Expand All @@ -29,9 +28,9 @@ In order to use "ring_wincreg" extension you have two options to start with:

* Using the functions of the extension directly

* Using the extension through RCRegistry Class
* Using the extension through RCRegistry Class Library

I would prefer to use the second option as you can read in RCRegistry Class section :ref:`RCRegistry-class-usage` and because I have added some other nice features using Ring that can be used only with RCRegistry class.
I would prefer to use the second option as you can read in (:ref:`RCRegistry-class-library-usage`) section and because I have added some other nice features using Ring that can be used only with RCRegistry class library.

.. index::
pair: Implementation and Usage; Direct extension's functions usage
Expand Down Expand Up @@ -72,26 +71,26 @@ This example does the following:
* Close the key "oKey".

.. index::
pair: Implementation and Usage; RCRegistry class usage
pair: Implementation and Usage; RCRegistry class library usage

.. _RCRegistry-class-usage:
.. _RCRegistry-class-library-usage:

RCRegistry class usage
=======================
RCRegistry class library usage
===============================

RCRegistry class has been made to simplify using "ring_wincreg" extension by avoid using its long function's names and give a nice template for dealing with entries.
RCRegistry class library has been made to simplify using "ring_wincreg" extension by avoid using its long function's names and introduce a nice template for dealing with entries.

.. code-block:: none

RCRegistryObject["EntryName"]

Also it reduces the pain of repeatedly mentioning the key handle and typing other parameters with each function call of this extension.

In a nutshell, this class brings a special, readable and nice coding experience throughout "ring_wincreg" extension usage.
In a nutshell, this class library brings a special, readable and nice coding experience throughout "ring_wincreg" extension usage.

It has been written in a ring library file called "wincreg.ring" which contains also another class named "RCRegEntry" class that is needed by RCRegistry class to deal with entries.
It has been written in a ring file called "wincreg.ring" which contains also another class named "RCRegEntry" that is needed by RCRegistry class to deal with entries.

To use "ring_wincreg" extension using this method you have to load "wincreg.ring" file. Because this file will load "ring_wincreg.dll" extension file and "wincreg.rh" file that it needs.
To use "ring_wincreg" extension using this library you have to load "wincreg.ring" file to your code, because this file will load "ring_wincreg.dll" extension file and "wincreg.rh" header file that it needs.

.. code-block:: none

Expand All @@ -117,7 +116,7 @@ Now we have to apply the previous example using this method to clarify the diffe

.. note::

RCRegistry class can represent and deal with one open key. So in case of dealing with more than one key at the same time we should define a separate RCRegistry Object for each key.
RCRegistry class can represent and deal with one opened key. So in case of dealing with more than one key at the same time we should define a separate RCRegistry Object for each key.

As we are really lucky using Ring, we can write the same previous example without creating any object like this:

Expand All @@ -137,4 +136,4 @@ As we are really lucky using Ring, we can write the same previous example withou

}

In the next sections I'm going to explain how to use "ring_wincreg" extension using RCRegistry class but I should also list all of the extension functions later on.
In the next sections I'm going to explain how to use "ring_wincreg" extension using RCRegistry class library but I should also list all of the extension functions later on.
14 changes: 7 additions & 7 deletions docs/build/html/_sources/introduction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ Absolutely, Supporting Windows Registry will give a big chance for the all commu
Ring_WinCReg Extension
=======================

Ring WinCReg extension is a very light, easy, and powerful extension for Ring Programming Language that has been made to bring all means of easiness in the dealing with Windows Registry. It gives you the ability to do from minor registry needs like saving or restoring settings to more superior goals like reaching and controlling every single key or value in the whole registry tree.
Ring WinCReg extension is a very light, easy, and powerful extension for Ring Programming Language that has been made to bring all means of easiness in regard to the dealing with Windows Registry. It gives you the ability to do from minor registry needs like saving or restoring settings to more superior goals like reaching and manipulating every single key or value in the whole registry tree.

This extension has been made on top of previously created C++ language class called "Registry Wrapper Class(CRegisry Class)" that has been published on `CodeProject in this article <http://www.codeproject.com/Articles/8953/Registry-Wrapper-Class-CRegistry>`_.
This extension has been made on top of previously created C++ language class called "Registry Wrapper Class (CRegisry Class)" that has been published on `CodeProject in this article <http://www.codeproject.com/Articles/8953/Registry-Wrapper-Class-CRegistry>`_.

.. index::
pair: Introduction; RCRegistry Class

RCRegistry Class
=================
RCRegistry Class Library
=========================

RCRegistry class, stands for Ring CRegistry Class or CRegistry Class for Ring, is a Ring Class that has been made to make using ring_wincreg extension functions easier by using the style of using "Registry Wrapper Class" in C++. I found this style is reasonable and readable better than just using the ring_wincreg original functions. It can be used by loading the file that contain it (wincreg.ring).
RCRegistry class, stands for Ring CRegistry Class or CRegistry Class for Ring, is a Ring Class that has been made to make using ring_wincreg extension functions easier by using the same style of "Registry Wrapper Class" usage in C++. I found this style reasonable and readable better than just using the ring_wincreg original functions (:ref:`RCRegistry-class-library-usage`). It can be used by loading the file that contains it (wincreg.ring).

.. index::
pair: Introduction; Simple Example

Simple Example
===============

This is a simple ring code that use this extension:
This is a simple ring code that uses this extension:

.. code-block:: none

Expand All @@ -44,7 +44,7 @@ This is a simple ring code that use this extension:
Reg = new RCRegistry

Reg.OpenKey([HKEY_CURRENT_USER, "Software\MyApp"])
# This will create the Key "MyApp" if its not present then it will be Opened
# This will create a key called "MyApp" if its not present then it will be Opened

Reg["AppVersion"].SetValue("2.3")

Expand Down
Loading

0 comments on commit 60892ae

Please sign in to comment.